pulumi
Manage and deploy cloud infrastructure as code
TLDR
Create a new project using a template
Create a new stack using an isolated deployment target
Configure variables (e.g. keys, regions, etc.) interactively
Preview and deploy changes to a program and/or infrastructure
Preview deployment changes without performing them (dry-run)
Destroy a program and its infrastructure
Use Pulumi locally, independent of a Pulumi Cloud
SYNOPSIS
pulumi [GLOBAL_OPTIONS] <COMMAND> [COMMAND_OPTIONS] [ARGUMENTS]
Common commands include:
up: Deploy or update a stack.
destroy: Tear down all resources in a stack.
new: Create a new Pulumi project.
stack: Manage stacks.
config: Manage stack configuration.
PARAMETERS
--stack <name>
Specify the stack name to operate on. If omitted, Pulumi attempts to use the currently selected stack.
--debug
Enable verbose debug logging output to stderr, useful for troubleshooting.
--verbose
Enable verbose logging output to stderr, showing more details about operations than default.
--non-interactive
Disable interactive prompts, making the command suitable for automation and scripting environments.
--color <auto|always|never>
Control the use of colorized output. 'auto' (default) enables colors if supported by the terminal, 'always' forces colors, 'never' disables them.
--cwd <path>
Run Pulumi commands from a specific working directory, overriding the current directory.
DESCRIPTION
The pulumi command-line interface (CLI) is the primary tool for interacting with the Pulumi infrastructure as code (IaC) platform. Pulumi enables developers and operations teams to define, deploy, and manage cloud infrastructure using familiar programming languages like TypeScript, Python, Go, C#, Java, and YAML, instead of domain-specific languages or declarative configuration files.
It supports a wide range of cloud providers including AWS, Azure, Google Cloud Platform, Kubernetes, and many others, treating infrastructure components (e.g., virtual machines, databases, networks, serverless functions) as programmable constructs. The pulumi CLI orchestrates the deployment process, performs previews of changes, manages state, and allows for rolling updates and rollbacks. It provides commands for creating new projects, deploying updates (up), destroying resources (destroy), managing configuration (config), and inspecting stacks (stack), integrating seamlessly into existing CI/CD pipelines.
CAVEATS
Pulumi requires a backend to store infrastructure state (e.g., Pulumi Service, local filesystem, S3, Azure Blob Storage), which must be configured and accessible for proper operation.
Users must be familiar with the chosen programming language and its runtime environment (e.g., Node.js for TypeScript, Python interpreter for Python) as Pulumi executes user-provided code.
Managing infrastructure state requires careful attention; direct manual changes to cloud resources outside of Pulumi can lead to 'drift' and inconsistencies between the desired state in code and the actual state.
CORE PHILOSOPHY: INFRASTRUCTURE AS SOFTWARE
Pulumi's fundamental principle is to treat infrastructure as software. This means applying familiar software development practices like version control, testing, modularity, abstraction, and reuse to infrastructure definitions. It enables teams to use existing IDEs, debugging tools, and CI/CD pipelines for infrastructure code.
LANGUAGE SUPPORT
Pulumi offers first-class support for a variety of popular programming languages including TypeScript/JavaScript, Python, Go, C#, and Java. It also supports defining infrastructure using YAML for simpler declarative scenarios, providing flexibility for different team skill sets and preferences.
BACKEND OPTIONS
Pulumi can store the state of your infrastructure deployments in various backends. The default and recommended backend is the Pulumi Cloud (SaaS), which offers features like state management, secrets, and collaboration. Alternatively, users can configure self-managed backends using cloud storage services like AWS S3, Azure Blob Storage, Google Cloud Storage, or even a local filesystem (primarily for testing).
HISTORY
Pulumi was founded in 2017 by Joe Duffy, an ex-Microsoft veteran, with the vision of treating infrastructure as software. The company, Pulumi Corp., released the open-source project to the public, aiming to provide a 'universal IaC' solution that leverages general-purpose programming languages. This approach was designed to bring familiar software engineering practices—like testing, reuse, and abstraction—to infrastructure management, addressing perceived limitations of existing DSL-based IaC tools.