Skip to main content
TerraformStack is a unit of deployment. Each stack synthesizes into its own Terraform configuration.

Constructor

Properties

kind

readonly kind: string The kind of stack.

dependencies

readonly dependencies: TerraformStack[] List of stacks that this stack depends on.

stackName

readonly stackName: string The name of the stack.

Methods

static of()

Returns the TerraformStack instance that contains the given construct.

getLogicalId()

Returns the logical ID for a given element within the stack.

prepareStack()

Performs preparation steps before synthesis.

synthesize()

Synthesizes the stack into a Terraform configuration.

toTerraform()

Returns the Terraform JSON representation of the stack.

addDependency()

Adds a dependency on another stack.

dependsOn()

Checks if this stack depends on another stack.

ensureBackendExists()

Ensures that a backend is defined for the stack.

allProviders()

Returns all providers defined in the stack.