2024-10-08 08:55:15 -07:00
|
|
|
# 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}}`
|
|
|
|
|
|
|
|
- View the stack state:
|
|
|
|
|
|
|
|
`pulumi stack`
|
|
|
|
|
2024-10-30 23:58:28 -07:00
|
|
|
- List stacks in the current project:
|
2024-10-08 08:55:15 -07:00
|
|
|
|
|
|
|
`pulumi stack ls`
|
|
|
|
|
2024-10-30 23:58:28 -07:00
|
|
|
- List stacks across all projects:
|
|
|
|
|
|
|
|
`pulumi stack ls --all`
|
|
|
|
|
2024-10-08 08:55:15 -07:00
|
|
|
- Select an active stack:
|
|
|
|
|
|
|
|
`pulumi stack select {{stack_name}}`
|
|
|
|
|
2025-02-28 23:52:25 -08:00
|
|
|
- Delete a stack:
|
|
|
|
|
|
|
|
`pulumi stack rm {{stack_name}}`
|
|
|
|
|
2024-10-08 08:55:15 -07:00
|
|
|
- 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}}`
|