@pulumi/pulumi
    Preparing search index...

    Class StackAlpha

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

    Index

    Properties

    name: string

    The name identifying the stack.

    workspace: Workspace

    The Workspace the stack was created from.

    Methods

    • Alpha

      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

      • ...environments: string[]

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

      Returns Promise<void>

    • Alpha

      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>

    • Alpha

      Returns the config value associated with the specified key.

      Parameters

      • key: string

        The key to use for the config lookup

      • Optionalpath: boolean

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

      Returns Promise<ConfigValue>

    • Alpha

      Returns the tag value associated with specified key.

      Parameters

      • key: string

        The key to use for the tag lookup.

      Returns Promise<string>

    • Alpha

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

      Parameters

      • OptionalpageSize: number
      • Optionalpage: number
      • OptionalshowSecrets: boolean

      Returns Promise<UpdateSummary[]>

    • Alpha

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

      Parameters

      • keys: string[]

        The config keys to remove.

      • Optionalpath: boolean

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

      Returns Promise<void>

    • Alpha

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

      Parameters

      • key: string

        The config key to remove.

      • Optionalpath: boolean

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

      Returns Promise<void>

    • Alpha

      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>

    • Alpha

      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>

    • Alpha

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

      Parameters

      • config: ConfigMap

        The map of config key-value pairs to set.

      • Optionalpath: boolean

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

      Returns Promise<void>

    • Alpha

      Sets all config values from a JSON string for the stack in the associated workspace. The JSON string should be in the format produced by "pulumi config --json".

      Parameters

      • configJson: string

        A JSON string containing the configuration values to set

      Returns Promise<void>

    • Alpha

      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.

      • Optionalpath: boolean

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

      Returns Promise<void>

    • Alpha

      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>

    • Alpha

      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>