Alpha
Readonly
nameThe name identifying the stack.
Readonly
workspaceThe Workspace the stack was created from.
Adds environments to the end of a stack's import list. Imported environments are merged in order per the ESC merge rules. The list of environments behaves as if it were the import list in an anonymous environment.
Rest
...environments: string[]The names of the environments to add to the stack's configuration
Stops a stack's currently running update. It returns an error if no update is currently running. Note that this operation is very dangerous, and may leave the stack in an inconsistent state if a resource operation was pending when the update was canceled.
Deletes all resources in a stack. By default, this method will leave all
history and configuration intact. If opts.remove
is set, the entire
stack and its configuration will also be deleted.
Optional
opts: DestroyOptionsOptions to customize the behavior of the destroy.
Exports the deployment state of the stack. This can be combined with Stack.importStack to edit a stack's state (such as recovery from failed deployments).
Returns the config value associated with the specified key.
The key to use for the config lookup
Optional
path: booleanThe key contains a path to a property in a map or list to get
Returns a list summarizing all previous and current results from Stack lifecycle operations (up/preview/refresh/destroy).
Optional
pageSize: numberOptional
page: numberOptional
showSecrets: booleanImport resources into the stack
Options to specify resources and customize the behavior of the import.
Imports the specified deployment state into a pre-existing stack. This can be combined with Stack.exportStack to edit a stack's state (such as recovery from failed deployments).
The stack state to import.
Optional
showSecrets: booleanPerforms a dry-run update to a stack, returning pending changes.
Optional
opts: PreviewOptionsOptions to customize the behavior of the preview.
Compares the current stack’s resource state with the state known to exist in the actual cloud provider. Any such changes are adopted into the current stack.
Optional
opts: RefreshOptionsOptions to customize the behavior of the refresh.
Sets all specified config values on the stack in the associated workspace.
The map of config key-value pairs to set.
Optional
path: booleanThe keys contain a path to a property in a map or list to set.
Sets a config key-value pair on the stack in the associated Workspace.
The key to set.
The config value to set.
Optional
path: booleanThe key contains a path to a property in a map or list to set.
Static
createCreates a new stack using the given workspace, and stack name. It fails if a stack with that name already exists
The name identifying the Stack.
The Workspace the Stack was created from.
Static
createCreates a new stack using the given workspace and stack name if the stack does not already exist, or falls back to selecting the existing stack. If the stack does not exist, it will be created and selected.
Static
selectSelects stack using the given workspace and stack name. It returns an error if the given stack does not exist.
Generated using TypeDoc
Stack is an isolated, independently configurable instance of a Pulumi program. Stack exposes methods for the full Pulumi lifecycle (up/preview/refresh/destroy), as well as managing configuration. Multiple Stacks are commonly used to denote different phases of development (such as development, staging and production) or feature branches (such as feature-x-dev, jane-feature-x-dev).