$linuxjunkies
>

pulumi(1)

Pulumi is an infrastructure as code platform for building, deploying, and managing cloud resources using programming languages.

UbuntuDebianFedoraArch

Synopsis

pulumi [COMMAND] [OPTIONS]

Description

Pulumi enables you to write infrastructure as code in languages like Python, Go, TypeScript, C#, and Java. It manages cloud resources across AWS, Azure, GCP, and other providers through a single unified interface.

Projects are defined in a Pulumi.yaml file, and resources are declared in code rather than YAML templates. Pulumi maintains a state file to track deployed resources and handle updates, replacements, and deletions automatically.

The CLI provides commands for creating projects, deploying stacks, previewing changes, and managing cloud resources across multiple environments.

Common options

FlagWhat it does
-s, --stack STACKSelect a specific stack to operate on (e.g., 'dev', 'prod')
--color auto|always|neverControl colored output in the terminal
--cwd DIRRun the command in a specific directory
--jsonOutput results in JSON format for scripting
--skip-version-checkSkip checking for newer CLI versions
--logtostderrLog output to stderr instead of stdout
-v, --verboseEnable verbose logging for debugging
--secrets-provider PROVIDERSpecify secrets backend (e.g., 'passphrase', 'awskms')

Examples

Create a new Pulumi project using the AWS TypeScript template

pulumi new aws-typescript

Preview changes that would be deployed to the 'prod' stack without making changes

pulumi preview -s prod

Deploy changes to the 'dev' stack automatically without confirmation prompt

pulumi up -s dev --yes

Tear down all resources in the 'staging' stack

pulumi destroy -s staging

List all available stacks for the current project

pulumi stack list

Set the AWS region configuration for the 'prod' stack

pulumi config set aws:region us-west-2 -s prod

Export the state of the 'prod' stack to a backup file

pulumi export -s prod > backup.json

Stream logs from the 'dev' stack in real-time

pulumi logs -s dev --follow

Related commands