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).

Properties

name: string

The name identifying the stack.

workspace: Workspace

The Workspace the stack was created from.

Methods

  • 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.

    Parameters

    • Rest ...environments: string[]

      The names of the environments to add to the stack's configuration

    Returns Promise<void>

  • 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.

    Returns Promise<void>

  • Returns the config value associated with the specified key.

    Parameters

    • key: string

      The key to use for the config lookup

    • Optional path: boolean

      The key contains a path to a property in a map or list to get

    Returns Promise<ConfigValue>

  • Returns the tag value associated with specified key.

    Parameters

    • key: string

      The key to use for the tag lookup.

    Returns Promise<string>

  • Returns a list summarizing all previous and current results from Stack lifecycle operations (up/preview/refresh/destroy).

    Parameters

    • Optional pageSize: number
    • Optional page: number
    • Optional showSecrets: boolean

    Returns Promise<UpdateSummary[]>

  • Removes the specified config keys from the stack in the associated workspace.

    Parameters

    • keys: string[]

      The config keys to remove.

    • Optional path: boolean

      The keys contain a path to a property in a map or list to remove.

    Returns Promise<void>

  • Removes the specified config key from the stack in the associated workspace.

    Parameters

    • key: string

      The config key to remove.

    • Optional path: boolean

      The key contains a path to a property in a map or list to remove.

    Returns Promise<void>

  • Removes an environment from a stack's import list.

    Parameters

    • environment: string

      The name of the environment to remove from the stack's configuration

    Returns Promise<void>

  • Removes the specified tag key-value pair from the stack in the associated workspace.

    Parameters

    • key: string

      The tag key to remove.

    Returns Promise<void>

  • Sets all specified config values on the stack in the associated workspace.

    Parameters

    • config: ConfigMap

      The map of config key-value pairs to set.

    • Optional path: boolean

      The keys contain a path to a property in a map or list to set.

    Returns Promise<void>

  • Sets a config key-value pair on the stack in the associated Workspace.

    Parameters

    • key: string

      The key to set.

    • value: ConfigValue

      The config value to set.

    • Optional path: boolean

      The key contains a path to a property in a map or list to set.

    Returns Promise<void>

  • Sets a tag key-value pair on the stack in the associated workspace.

    Parameters

    • key: string

      The tag key to set.

    • value: string

      The tag value to set.

    Returns Promise<void>

  • Creates 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.

    Parameters

    • name: string

      The name identifying the Stack.

    • workspace: Workspace

      The Workspace the stack will be created from.

    Returns Promise<automation.Stack>

Generated using TypeDoc