LinuxCommandLibrary

pulumi-up

Deploy and update Pulumi infrastructure stacks

TLDR

Preview and deploy changes to a program and/or infrastructure

$ pulumi up
copy

Automatically approve and perform the update after previewing it
$ pulumi up [[-y|--yes]]
copy

Preview and deploy changes in a specific stack
$ pulumi up [[-s|--stack]] [stack]
copy

Don't display stack outputs
$ pulumi up --suppress-outputs
copy

Continue updating the resources, even if an error is encountered
$ pulumi up --continue-on-error
copy

SYNOPSIS

pulumi up [options]

PARAMETERS

--stack
    Specify the stack to operate on.

--message
    Attach an optional message to the update operation for history.

--yes
    Automatically approve and skip confirmation prompts. Use with caution.

--diff
    Display a full diff of proposed resource changes.

--target
    Target a specific resource by URN for update (can be repeated).

--replace
    Force replacement of a specific resource by URN (can be repeated).

--skip-preview
    Execute without first showing a preview of changes.

--expect-no-changes
    Exit with an error if any changes are proposed. Useful for CI/CD pipelines.

--policy-pack
    Apply one or more policy packs during the update for governance.

--parallel
    Set the maximum number of parallel resource operations (default is 16).

--secrets-provider
    Specify the secrets encryption provider to use for the stack.

--config
    Set or override a stack configuration value (can be repeated).

--show-secrets
    Display secret values in the output.

--show-urns
    Display resource URNs in the output.

--show-config
    Display the stack's configuration in the output.

--show-resource-outputs
    Display resource outputs in the output.

--show-stack-outputs
    Display stack outputs in the output.

--color
    Control output coloring (default is 'auto').

--debug
    Enable debug logging.

--logtostderr
    Log messages to standard error instead of files.

--verbose
    Set the verbosity level for logging.

DESCRIPTION

The pulumi-up command is the core operation in Pulumi for deploying and managing cloud infrastructure. When executed, Pulumi analyzes your program (written in languages like TypeScript, Python, Go, C#) to determine the desired state of your cloud resources. It then compares this desired state with the current state of your deployed resources (tracked in the Pulumi state file).

A "preview" is generated, showing a detailed list of proposed changes (creations, updates, deletions). The user is prompted to confirm these changes before they are applied to the cloud provider. pulumi-up handles the orchestration of these changes, ensuring resources are created/updated in the correct order, managing dependencies, and retrying operations as needed. It's an idempotent operation, meaning running it multiple times with the same program will converge to the same infrastructure state. This command is fundamental for managing the lifecycle of your cloud environments, from initial deployment to ongoing updates and configuration changes.

CAVEATS

Using --yes bypasses critical review; it is highly recommended to review the preview before applying changes, especially in production environments.
Deletions of resources are destructive and typically irreversible from the cloud provider's side.
Direct manipulation of the Pulumi state file is not recommended and can lead to inconsistencies.

IDEMPOTENCY

pulumi-up is an idempotent operation. Running it multiple times with the same Pulumi program will always converge to the same desired state for your infrastructure, only making changes if there is a detected drift or an update to your program.

STATE MANAGEMENT

Pulumi maintains a state file for each stack, which acts as a source of truth for the deployed resources and their properties. The pulumi-up command relies heavily on this state file to understand the current infrastructure and compute the necessary changes.

HISTORY

Pulumi was founded in 2017 with the vision to enable developers to build and manage cloud infrastructure using familiar programming languages. The pulumi-up command has been central to this vision from its inception, embodying the core deployment mechanism. Over time, it has gained advanced features like policy enforcement, targeted resource operations, and improved preview capabilities, reflecting the evolving needs of infrastructure as code.

SEE ALSO

pulumi preview(1), pulumi destroy(1), pulumi refresh(1), pulumi state(1), pulumi config(1)

Copied to clipboard