1. Docs
  2. Pulumi IaC
  3. Pulumi CLI

Pulumi CLI overview

Pulumi is controlled primarily using the command line interface (CLI). It works in conjunction with the Pulumi Cloud to deploy changes to your cloud apps and infrastructure. It keeps a history of who updated what in your team and when. This CLI has been designed for great inner loop productivity, in addition to continuous integration and delivery scenarios.

Installation

The Pulumi CLI is open source and free to use:

Install Pulumi

Common Commands

The most common commands in the CLI that you’ll be using are as follows:

  • pulumi new: creates a new project using a template
  • pulumi stack: manage your stacks (at least one is required to perform an update)
  • pulumi config: configure variables such as keys, regions, and so on
  • pulumi up: preview and deploy changes to your program and/or infrastructure
  • pulumi preview: preview your changes explicitly before deploying
  • pulumi destroy: destroy your program and its infrastructure when you’re done

Complete Reference

Below is the complete documentation for all available commands:

Pulumi command line

Synopsis

Pulumi - Modern Infrastructure as Code

To begin working with Pulumi, run the pulumi new command:

$ pulumi new

This will prompt you to create a new project for your cloud and language of choice.

The most common commands from there are:

- pulumi up       : Deploy code and/or resource changes
- pulumi stack    : Manage instances of your project
- pulumi config   : Alter your stack's configuration or secrets
- pulumi destroy  : Tear down your stack's resources entirely

For more information, please visit the project page: https://www.pulumi.com/docs/

Options

      --color string                 Colorize output. Choices are: always, never, raw, auto (default "auto")
  -C, --cwd string                   Run pulumi as if it had been started in another directory
      --disable-integrity-checking   Disable integrity checking of checkpoint files
  -e, --emoji                        Enable emojis in the output
  -Q, --fully-qualify-stack-names    Show fully-qualified stack names
  -h, --help                         help for pulumi
      --logflow                      Flow log settings to child processes (like plugins)
      --logtostderr                  Log to stderr instead of to files
      --memprofilerate int           Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate
      --non-interactive              Disable interactive mode for all commands
      --profiling string             Emit CPU and memory profiles and an execution trace to '[filename].[pid].{cpu,mem,trace}', respectively
      --tracing file:                Emit tracing to the specified endpoint. Use the file: scheme to write tracing data to a local file
  -v, --verbose int                  Enable verbose logging (e.g., v=3); anything >3 is very verbose

SEE ALSO

Environment Variables

For a list of environment variables that you can use to work with the Pulumi CLI, see Environment Variables.

PulumiUP 2024. Watch On Demand.