Alpha
Environment values scoped to the current workspace. These will be supplied to every Pulumi command.
Optional
programThe inline program PulumiFn
to be used for Preview/Update operations if any.
If none is specified, the stack will refer to ProjectSettings for this information.
Readonly
pulumiThe underlying Pulumi CLI.
Optional
Readonly
pulumiThe directory override for CLI metadata if set. This customizes the location of $PULUMI_HOME where metadata is stored and plugins are installed.
Readonly
pulumiThe version of the underlying Pulumi CLI/Engine.
Optional
Readonly
secretsThe secrets provider to use for encryption and decryption of stack secrets. See: https://www.pulumi.com/docs/intro/concepts/secrets/#available-encryption-providers
Readonly
workThe working directory to run Pulumi CLI commands
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.
The stack to operate on
Rest
...environments: string[]The names of the environments to add to the stack's configuration
exportStack exports the deployment state of the stack. This can be combined with Workspace.importStack to edit a stack's state (such as recovery from failed deployments).
the name of the stack.
Returns the value associated with the specified stack name and key, scoped to the Workspace.
The stack to read config from
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
importStack imports the specified deployment state into a pre-existing stack. This can be combined with Workspace.exportStack to edit a stack's state (such as recovery from failed deployments).
the name of the stack.
the stack state to import.
Installs a plugin in the Workspace from a remote server, for example a third party plugin.
the name of the plugin.
the version of the plugin e.g. "v1.0.0".
Optional
kind: stringthe kind of plugin e.g. "resource"
Installs a plugin in the Workspace, for example to use cloud providers like AWS or GCP.
the name of the plugin.
the version of the plugin e.g. "v1.0.0".
the server to install the plugin into
Returns a list of all plugins installed in the Workspace.
Returns all Stacks created under the current Project.
This queries underlying backend and may return stacks not present in the Workspace (as Pulumi.
postCommandCallback is a hook executed after every command. Called with the stack name. An extensibility point to perform workspace cleanup (CLI operations may create/modify a Pulumi.stack.yaml) LocalWorkspace does not utilize this extensibility point.
Returns the settings object for the current project if any.
Removes all values in the provided key list for the specified stack name.
The stack to operate on
The list of keys to remove from the underlying config
Optional
path: booleanThe keys contain a path to a property in a map or list to remove
Removes the specified key-value pair on the provided stack name.
The stack to operate on
The config key to remove
Optional
path: booleanThe key contains a path to a property in a map or list to remove
Removes a plugin from the Workspace matching the specified name and version.
Optional
name: stringthe optional name of the plugin.
Optional
versionRange: stringoptional semver range to check when removing plugins matching the given name e.g. "1.0.0", ">1.0.0".
Optional
kind: stringhe kind of plugin e.g. "resource"
Overwrites the settings object in the current project. There can only be a single project per workspace. Fails is new project name does not match old.
The settings object to save.
overwrites the settings object for the stack matching the specified stack name.
The name of the stack to operate on.
The settings object to save.
serializeArgsForOp is hook to provide additional args to every CLI commands before they are executed. Provided with stack name, returns a list of args to append to an invoked command ["--config=...", ] LocalWorkspace does not utilize this extensibility point.
Sets all values in the provided config map for the specified stack name.
The stack to operate on
The ConfigMap
to upsert against the existing config
Optional
path: booleanThe keys contain a path to a property in a map or list to set
Sets the specified key-value pair on the provided stack name.
The stack to operate on
The config key to set
The value to set
Optional
path: booleanThe key contains a path to a property in a map or list to set
Returns a summary of the currently selected stack, if any.
Returns the settings object for the stack matching the specified stack name if any.
The name of the stack.
Returns the currently authenticated user.
Generated using TypeDoc
Workspace is the execution context containing a single Pulumi project, a program, and multiple stacks. Workspaces are used to manage the execution environment, providing various utilities such as plugin installation, environment configuration ($PULUMI_HOME), and creation, deletion, and listing of Stacks.