Skip to main content

Initializers

import cdktn

cdktn.TerraformStack(
  scope: Construct,
  id: str
)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstrNo description.

scopeRequired

  • Type: constructs.Construct

idRequired

  • Type: str

Methods

NameDescription
to_stringReturns a string representation of this construct.
add_dependencyNo description.
add_overrideNo description.
all_providersNo description.
depends_onNo description.
ensure_backend_existsNo description.
get_logical_idNo description.
has_resource_moveNo description.
prepare_stackNo description.
register_incoming_cross_stack_referenceNo description.
register_outgoing_cross_stack_referenceNo description.
run_all_validationsRun all validations on the stack.
to_hcl_terraformNo description.
to_terraformNo description.

to_string

def to_string() -> str
Returns a string representation of this construct.

add_dependency

def add_dependency(
  dependency: TerraformStack
) -> None

dependencyRequired


add_override

def add_override(
  path: str,
  value: typing.Any
) -> None

pathRequired

  • Type: str

valueRequired

  • Type: typing.Any

all_providers

def all_providers() -> typing.List[TerraformProvider]

depends_on

def depends_on(
  stack: TerraformStack
) -> bool

stackRequired


ensure_backend_exists

def ensure_backend_exists() -> TerraformBackend

get_logical_id

def get_logical_id(
  tf_element: Node | TerraformElement
) -> str

tf_elementRequired


has_resource_move

def has_resource_move() -> bool

prepare_stack

def prepare_stack() -> None

register_incoming_cross_stack_reference

def register_incoming_cross_stack_reference(
  from_stack: TerraformStack
) -> TerraformRemoteState

from_stackRequired


register_outgoing_cross_stack_reference

def register_outgoing_cross_stack_reference(
  identifier: str
) -> TerraformOutput

identifierRequired

  • Type: str

run_all_validations

def run_all_validations() -> None
Run all validations on the stack.

to_hcl_terraform

def to_hcl_terraform() -> typing.Mapping[typing.Any]

to_terraform

def to_terraform() -> typing.Any

Static Functions

NameDescription
is_constructChecks if x is a construct.
is_stackNo description.
ofNo description.

is_construct

import cdktn

cdktn.TerraformStack.is_construct(
  x: typing.Any
)
Checks if x is a construct. Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked. Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired

  • Type: typing.Any
Any object.

is_stack

import cdktn

cdktn.TerraformStack.is_stack(
  x: typing.Any
)

xRequired

  • Type: typing.Any

of

import cdktn

cdktn.TerraformStack.of(
  construct: IConstruct
)

constructRequired

  • Type: constructs.IConstruct

Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
dependenciestyping.List[TerraformStack]No description.
move_targetsTerraformResourceTargetsNo description.
synthesizerIStackSynthesizerNo description.

nodeRequired

node: Node
  • Type: constructs.Node
The tree node.

dependenciesRequired

dependencies: typing.List[TerraformStack]

move_targetsRequired

move_targets: TerraformResourceTargets

synthesizerRequired

synthesizer: IStackSynthesizer