Skip to main content

Initializers


scopeRequired

  • Type: constructs.Construct

idRequired

  • Type: str

connectionOptional


countOptional


depends_onOptional


for_eachOptional


lifecycleOptional


providerOptional


provisionersOptional


terraform_resource_typeRequired

  • Type: str

terraform_generator_metadataOptional


Methods


to_string

Returns a string representation of this construct.

with

Applies one or more mixins to this construct. Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

mixinsRequired

  • Type: *constructs.IMixin
The mixins to apply.

add_override

pathRequired

  • Type: str

valueRequired

  • Type: typing.Any

override_logical_id

Overrides the auto-generated logical ID with a specific ID.

new_logical_idRequired

  • Type: str
The new logical ID to use for this stack element.

reset_override_logical_id

Resets a previously passed logical Id to use the auto-generated logical id again.

to_hcl_terraform

to_metadata

to_terraform

Adds this resource to the terraform JSON output.

add_move_target

Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.

move_targetRequired

  • Type: str
The string move target that will correspond to this resource.

get_any_map_attribute

terraform_attributeRequired

  • Type: str

get_boolean_attribute

terraform_attributeRequired

  • Type: str

get_boolean_map_attribute

terraform_attributeRequired

  • Type: str

get_list_attribute

terraform_attributeRequired

  • Type: str

get_number_attribute

terraform_attributeRequired

  • Type: str

get_number_list_attribute

terraform_attributeRequired

  • Type: str

get_number_map_attribute

terraform_attributeRequired

  • Type: str

get_string_attribute

terraform_attributeRequired

  • Type: str

get_string_map_attribute

terraform_attributeRequired

  • Type: str

has_resource_move

import_from

idRequired

  • Type: str

providerOptional


interpolation_for_attribute

terraform_attributeRequired

  • Type: str

move_from_id

Move the resource corresponding to “id” to this resource. Note that the resource being moved from must be marked as moved using it’s instance function.

idRequired

  • Type: str
Full id of resource being moved from, e.g. “aws_s3_bucket.example”.

move_to

Moves this resource to the target resource given by moveTarget.

move_targetRequired

  • Type: str
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.

indexOptional

  • Type: str | typing.Union[int, float]
Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.

move_to_id

Moves this resource to the resource corresponding to “id”.

idRequired

  • Type: str
Full id of resource to move to, e.g. “aws_s3_bucket.example”.

Static Functions


is_construct

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_terraform_element

xRequired

  • Type: typing.Any

is_terraform_resource

xRequired

  • Type: typing.Any

Properties


nodeRequired

  • Type: constructs.Node
The tree node.

cdktf_stackRequired


fqnRequired

  • Type: str

friendly_unique_idRequired

  • Type: str

terraform_meta_argumentsRequired

  • Type: typing.Mapping[typing.Any]

terraform_resource_typeRequired

  • Type: str

terraform_generator_metadataOptional


connectionOptional


countOptional


depends_onOptional

  • Type: typing.List[str]

for_eachOptional


lifecycleOptional


providerOptional


provisionersOptional