HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pulumi stack — Manage stacks and view stack state. More information: <https://www.pulumi.com/docs/iac/cli/commands/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
stackscommandandstackpulumi stackclimanageview

Problem

How to use the pulumi stack command: Manage stacks and view stack state. More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_stack/>.

Solution

pulumi stack — Manage stacks and view stack state. More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_stack/>.

Create a new stack:
pulumi stack init {{stack_name}}


Show the stack state along with resource URNs:
pulumi stack {{[-u|--show-urns]}}


List stacks in the current project:
pulumi stack ls


List stacks across all projects:
pulumi stack ls {{[-a|--all]}}


Select an active stack:
pulumi stack select {{stack_name}}


Delete a stack:
pulumi stack rm {{stack_name}}


Show stack outputs, including secrets, in plaintext:
pulumi stack output --show-secrets


Export the stack state to a JSON file:
pulumi stack export --file {{path/to/file.json}}

Code Snippets

Create a new stack

pulumi stack init {{stack_name}}

Show the stack state along with resource URNs

pulumi stack {{[-u|--show-urns]}}

List stacks in the current project

pulumi stack ls

List stacks across all projects

pulumi stack ls {{[-a|--all]}}

Select an active stack

pulumi stack select {{stack_name}}

Context

tldr-pages: common/pulumi stack

Revisions (0)

No revisions yet.