Skip to content

Latest commit

 

History

History
121 lines (76 loc) · 5.28 KB

File metadata and controls

121 lines (76 loc) · 5.28 KB

Lab 00.02: Getting the Pulumi CLI

Next, you'll need the Pulumi CLI. Depending on what system you're running, you'll need different tools. The most recent version of this guide can be found on Pulumi's CLI install page, but here it is in case you need it.

MacOS

There are four ways to install the Pulumi CLI on MacOS.

Homebrew

The best way and the way I'd recommend is via Homebrew and the official tap:

$ brew install pulumi/tap/pulumi

MacPorts

If you don't want to use Homebrew, you can use Macports:

$ sudo port install pulumi

MacOS Installation Script

If you don't use Homebrew or MacPorts, you can use the install script via CURL:

$ curl -fsSL https://get.pulumi.com | sh

MacOS Manual Installation

If none of those work for you, you can install manually.

  1. Download the latest version from the Available Versions page. For prior versions and release notes, reference the Available Versions page.
  2. Extract the tarball and move the binaries in the pulumi directory to a directory included in your system's $PATH.

Windows

There are five ways to install the Pulumi CLI on Windows.

Chocolatey

You can install Pulumi using elevated permissions through the Chocolatey package manager:

> choco install pulumi

This command will install the Pulumi CLI to the usual place (often $($env:ChocolateyInstall)\lib\pulumi) and generate the shims (usually $($env:ChocolateyInstall)\bin) to add the Pulumi CLI your path.

Winget

Install Pulumi using the winget-cli package manager. This tool is built-in on Windows 11 and later.

> winget install pulumi

Standalone Installer

You can download the latest Pulumi CLI Installer for Windows x64 and run it like any other installer. It will automatically add the Pulumi CLI to the path and make it available machine-wide.

Windows Installation Script

Open a new command prompt window (WIN+R: cmd.exe):

Run the installation script:

> @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://get.pulumi.com/install.ps1'))" && SET "PATH=%PATH%;%USERPROFILE%\.pulumi\bin"

This command will install the pulumi.exe CLI to %USERPROFILE%\.pulumi\bin and add it to your path.

Windows Manual Installation

Alternatively, you can install Pulumi manually using binaries built for Windows x64.

  1. Download the latest version from the Available Versions page. For prior versions and release notes, reference the Available Versions page.
  2. Unzip the file and extract the contents to a folder, such as C:\pulumi.
  3. Add C:\pulumi\bin to your path via System Properties > Advanced > Environment Variables > User Variables > Path > Edit.

Linux

There are two ways to install the Pulumi CLI on a Linux box.

Linux Installation Script

To install, run this installation script:

curl -fsSL https://get.pulumi.com | sh

This command will install the Pulumi CLI to ~/.pulumi/bin and add it to your path. When it can't automatically add pulumi to your path, you will be prompted to add it manually. See How to permanently set $PATH on Unix for guidance.

Linux Manual Installation

Alternatively, you can install the Pulumi CLI manually. There is a prebuilt binary for Linux.

  1. Download the latest version from the Available Versions page. For prior versions and release notes, reference the Available Versions page.
  2. Extract the tarball and move the binaries in the pulumi directory to a directory included in your system's $PATH.