pulumi-update
Update infrastructure to desired state
TLDR
View documentation for the original command
SYNOPSIS
pulumi update [flags]
PARAMETERS
--yes
Automatically approve and perform the update without prompting.
--message
Attach a message to the update's state, useful for logging and audit purposes.
--target
Target a specific resource URN to update. Can be specified multiple times.
--target-dependents
Allows updating resources that are dependent on the targeted resource(s).
--replace
Specify a resource URN to replace. Can be specified multiple times.
--expect-no-changes
Expect no changes and fail if any are detected.
--skip-preview
Do not perform a preview before the update.
--diff
Display the diff of the changes.
--color
Colorize output. Choices: always, never, auto. Default is auto.
--debug
Enable debug logging.
--parallel
Allow N resources to run in parallel at once (1 for no parallelism). Defaults to unbounded.
--refresh
Refresh the state of the stack before running the update.
--config-file
Load configuration values from the specified file path. This can be specified multiple times.
--config
Configuration key/value pair to use. Can be specified multiple times.
--stack
The name of the stack to operate on. Defaults to the current stack.
--profile
The name of the Pulumi profile to use.
DESCRIPTION
The `pulumi update` command deploys changes to your cloud infrastructure as defined in your Pulumi program. It compares the desired state (defined in your code) with the current state (stored in Pulumi's state file) and generates a plan of changes. This plan is then executed, creating, updating, or deleting cloud resources as necessary to bring your infrastructure into the desired state.
During the update process, Pulumi provides detailed progress information, including resource status, diffs of property changes, and error messages. It leverages concurrency and dependency analysis to perform operations in parallel where possible, optimizing the deployment time. The command can be run interactively, prompting for confirmation before applying changes, or non-interactively, accepting all changes automatically. It supports sophisticated rollbacks and history tracking, allowing you to revert to previous deployments if needed. It enables safe and repeatable infrastructure management across different cloud providers and environments.
CAVEATS
Requires Pulumi CLI to be installed and configured. The Pulumi program must be valid and compilable. Incorrect configurations or program errors can lead to failed updates and infrastructure inconsistencies. Rollbacks might not be perfect if external systems are mutated outside of Pulumi's control.
EXIT CODES
0: Success.
1: General error.
2: Update failed due to errors in the Pulumi program or cloud provider issues.
3: Preview failed (if preview is performed before update).
CONCURRENCY
Pulumi automatically parallelizes resource operations based on dependency graphs. Use the `--parallel` flag to control the maximum number of concurrent operations.
CONFIGURATION
Configuration values can be set via the command line using `--config`, via environment variables, or in configuration files. Precedence is command line > environment variables > configuration files. Secret configuration is supported using `pulumi config set --secret`.
HISTORY
The `pulumi update` command is a core component of the Pulumi infrastructure-as-code platform. It evolved alongside Pulumi to provide increasingly sophisticated features for managing cloud resources, including resource dependencies, concurrency, rollbacks, and drift detection. Its development focused on providing a reliable and efficient mechanism for deploying and managing cloud infrastructure programmatically.
SEE ALSO
pulumi(1), pulumi-preview(1), pulumi-destroy(1), pulumi-stack(1)