API Reference for Python
Constructs
App
Represents a cdktf application.
Initializers
Name | Type | Description |
---|---|---|
context | typing.Mapping[typing.Any] | Additional context values for the application. |
hcl_output | bool | No description. |
outdir | str | The directory to output Terraform resources. |
skip_backend_validation | bool | Whether to skip backend validation during synthesis of the app. |
skip_validation | bool | Whether to skip all validations during synthesis of the app. |
stack_traces | bool | No description. |
context
Optional
- Type: typing.Mapping[typing.Any]
- Default: no additional context
Additional context values for the application.
Context set by the CLI or the context
key in cdktf.json
has precedence.
Context can be read from any construct using node.getContext(key)
.
hcl_output
Optional
- Type: bool
outdir
Optional
- Type: str
- Default: CDKTF_OUTDIR if defined, otherwise "cdktf.out"
The directory to output Terraform resources.
If you are using the CDKTF CLI, this value is automatically set from one of the following three sources:
- The
-o
/--output
CLI option - The
CDKTF_OUTDIR
environment variable - The
outdir
key incdktf.json
If you are using the CDKTF CLI and want to set a different value here, you will also need to set the same value via one of the three ways specified above.
The most common case to set this value is when you are using the CDKTF library directly (e.g. when writing unit tests).
skip_backend_validation
Optional
- Type: bool
- Default: false
Whether to skip backend validation during synthesis of the app.
skip_validation
Optional
- Type: bool
- Default: false
Whether to skip all validations during synthesis of the app.
stack_traces
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
cross_stack_reference | Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources. |
synth | Synthesizes all resources to the output directory. |
to_string
Returns a string representation of this construct.
cross_stack_reference
Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources.
from_stack
Required
- Type: TerraformStack
to_stack
Required
- Type: TerraformStack
identifier
Required
- Type: str
synth
Synthesizes all resources to the output directory.
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_app | No description. |
of | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_app
x
Required
- Type: typing.Any
of
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
hcl_output | bool | No description. |
manifest | Manifest | No description. |
outdir | str | The output directory into which resources will be synthesized. |
skip_backend_validation | bool | Whether to skip backend validation during synthesis of the app. |
skip_validation | bool | Whether to skip all validations during synthesis of the app. |
target_stack_id | str | The stack which will be synthesized. |
node
Required
- Type: constructs.Node
The tree node.
hcl_output
Required
- Type: bool
manifest
Required
- Type: Manifest
outdir
Required
- Type: str
The output directory into which resources will be synthesized.
skip_backend_validation
Required
- Type: bool
Whether to skip backend validation during synthesis of the app.
skip_validation
Required
- Type: bool
Whether to skip all validations during synthesis of the app.
target_stack_id
Optional
- Type: str
The stack which will be synthesized.
If not set, all stacks will be synthesized.
AzurermBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
container_name | str | (Required) The Name of the Storage Container within the Storage Account. |
key | str | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storage_account_name | str | (Required) The Name of the Storage Account. |
access_key | str | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
client_certificate_password | str | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
client_certificate_path | str | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
client_id | str | (Optional) The Client ID of the Service Principal. |
client_secret | str | (Optional) The Client Secret of the Service Principal. |
endpoint | str | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | str | (Optional) The Azure Environment which should be used. |
metadata_host | str | (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.). |
msi_endpoint | str | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidc_request_token | str | (Optional) The bearer token for the request to the OIDC provider. |
oidc_request_url | str | (Optional) The URL for the OIDC provider from which to request an ID token. |
oidc_token | str | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
oidc_token_file_path | str | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
resource_group_name | str | (Required) The Name of the Resource Group in which the Storage Account exists. |
sas_token | str | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | bool | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscription_id | str | (Optional) The Subscription ID in which the Storage Account exists. |
tenant_id | str | (Optional) The Tenant ID in which the Subscription exists. |
use_azuread_auth | bool | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
use_microsoft_graph | bool | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
use_msi | bool | (Optional) Should Managed Service Identity authentication be used? |
use_oidc | bool | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
scope
Required
- Type: constructs.Construct
container_name
Required
- Type: str
(Required) The Name of the Storage Container within the Storage Account.
key
Required
- Type: str
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storage_account_name
Required
- Type: str
(Required) The Name of the Storage Account.
access_key
Optional
- Type: str
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
client_certificate_password
Optional
- Type: str
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
client_certificate_path
Optional
- Type: str
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
client_id
Optional
- Type: str
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
client_secret
Optional
- Type: str
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
environment
Optional
- Type: str
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
metadata_host
Optional
- Type: str
(Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.).
msi_endpoint
Optional
- Type: str
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
oidc_request_token
Optional
- Type: str
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
oidc_request_url
Optional
- Type: str
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
oidc_token
Optional
- Type: str
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
oidc_token_file_path
Optional
- Type: str
(Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN_FILE_PATH environment variable.
resource_group_name
Optional
- Type: str
(Required) The Name of the Resource Group in which the Storage Account exists.
sas_token
Optional
- Type: str
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
snapshot
Optional
- Type: bool
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
subscription_id
Optional
- Type: str
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenant_id
Optional
- Type: str
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
use_azuread_auth
Optional
- Type: bool
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
use_microsoft_graph
Optional
- Type: bool
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
use_msi
Optional
- Type: bool
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
use_oidc
Optional
- Type: bool
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
CloudBackend
The Cloud Backend synthesizes a {@link https://developer.hashicorp.com/terraform/cli/cloud/settings#the-cloud-block cloud block}. The cloud block is a nested block within the top-level terraform settings block. It specifies which Terraform Cloud workspaces to use for the current working directory. The cloud block only affects Terraform CLI's behavior. When Terraform Cloud uses a configuration that contains a cloud block - for example, when a workspace is configured to use a VCS provider directly - it ignores the block and behaves according to its own workspace settings.
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
organization | str | The name of the organization containing the workspace(s) the current configuration should use. |
workspaces | typing.Union[NamedCloudWorkspace, TaggedCloudWorkspaces] | A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration. |
hostname | str | The hostname of a Terraform Enterprise installation, if using Terraform Enterprise. |
token | str | The token used to authenticate with Terraform Cloud. |
scope
Required
- Type: constructs.Construct
organization
Required
- Type: str
The name of the organization containing the workspace(s) the current configuration should use.
workspaces
Required
- Type: typing.Union[NamedCloudWorkspace, TaggedCloudWorkspaces]
A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration.
The workspaces block must contain exactly one of the following arguments, each denoting a strategy for how workspaces should be mapped:
hostname
Optional
- Type: str
- Default: app.terraform.io
The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.
token
Optional
- Type: str
The token used to authenticate with Terraform Cloud.
We recommend omitting the token from the configuration, and instead using terraform login or manually configuring credentials in the CLI config file.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
ConsulBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
access_token | str | (Required) Access token. |
path | str | (Required) Path in the Consul KV store. |
address | str | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
ca_file | str | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
cert_file | str | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
datacenter | str | (Optional) The datacenter to use. |
gzip | bool | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
http_auth | str | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
key_file | str | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
lock | bool | (Optional) false to disable locking. |
scheme | str | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
scope
Required
- Type: constructs.Construct
access_token
Required
- Type: str
(Required) Access token.
path
Required
- Type: str
(Required) Path in the Consul KV store.
address
Optional
- Type: str
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
ca_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
cert_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenter
Optional
- Type: str
(Optional) The datacenter to use.
Defaults to that of the agent.
gzip
Optional
- Type: bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
http_auth
Optional
- Type: str
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
key_file
Optional
- Type: str
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lock
Optional
- Type: bool
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
scheme
Optional
- Type: str
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
CosBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
bucket | str | (Required) The name of the COS bucket. |
accelerate | bool | (Optional) Whether to enable global Acceleration. |
acl | str | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
assume_role | CosBackendAssumeRole | (Optional) The assume_role block. |
domain | str | (Optional) The root domain of the API request. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) The Custom Endpoint for the COS backend. |
key | str | (Optional) The path for saving the state file in bucket. |
prefix | str | (Optional) The directory for saving the state file in bucket. |
region | str | (Optional) The region of the COS bucket. |
secret_id | str | (Optional) Secret id of Tencent Cloud. |
secret_key | str | (Optional) Secret key of Tencent Cloud. |
security_token | str | (Optional) TencentCloud Security Token of temporary access credentials. |
scope
Required
- Type: constructs.Construct
bucket
Required
- Type: str
(Required) The name of the COS bucket.
You shall manually create it first.
accelerate
Optional
- Type: bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assume_role
Optional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
- Type: str
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
key
Optional
- Type: str
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The directory for saving the state file in bucket.
Default to "env:".
region
Optional
- Type: str
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secret_id
Optional
- Type: str
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secret_key
Optional
- Type: str
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
security_token
Optional
- Type: str
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
DataResource
The DataResource implements the standard resource lifecycle, but does not directly take any other actions.
You can use the DataResource resource without requiring or configuring a provider.
The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them.
It requires Terraform 1.4 or later.
It is also possible to generate these bindings by adding "terraform.io/builtin/terraform" to the "terraformProviders" key in your cdktf.json file and running "cdktf get".
https://developer.hashicorp.com/terraform/language/resources/terraform-data
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | The scope in which to define this construct. |
id | str | The scoped construct ID. |
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
input | typing.Mapping[typing.Any] | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
triggers_replace | typing.Mapping[typing.Any] | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
id
Required
- Type: str
The scoped construct ID.
Must be unique amongst siblings in the same scope
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
input
Optional
- Type: typing.Mapping[typing.Any]
(Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#input
triggers_replace
Optional
- Type: typing.Mapping[typing.Any]
(Optional) A value which is stored in the instance state, and will force replacement when the value changes.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
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. |
get_any_map_attribute | No description. |
get_boolean_attribute | No description. |
get_boolean_map_attribute | No description. |
get_list_attribute | No description. |
get_number_attribute | No description. |
get_number_list_attribute | No description. |
get_number_map_attribute | No description. |
get_string_attribute | No description. |
get_string_map_attribute | No description. |
has_resource_move | No description. |
import_from | No description. |
interpolation_for_attribute | No description. |
move_from_id | Move the resource corresponding to "id" to this resource. |
move_to | Moves this resource to the target resource given by moveTarget. |
move_to_id | Moves this resource to the resource corresponding to "id". |
reset_input | No description. |
reset_triggers_replace | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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_target
Required
- Type: str
The string move target that will correspond to this resource.
get_any_map_attribute
terraform_attribute
Required
- Type: str
get_boolean_attribute
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
terraform_attribute
Required
- Type: str
get_list_attribute
terraform_attribute
Required
- Type: str
get_number_attribute
terraform_attribute
Required
- Type: str
get_number_list_attribute
terraform_attribute
Required
- Type: str
get_number_map_attribute
terraform_attribute
Required
- Type: str
get_string_attribute
terraform_attribute
Required
- Type: str
get_string_map_attribute
terraform_attribute
Required
- Type: str
has_resource_move
import_from
id
Required
- Type: str
provider
Optional
- Type: TerraformProvider
interpolation_for_attribute
terraform_attribute
Required
- 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.
id
Required
- 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_target
Required
- Type: str
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
index
Optional
- Type: typing.Union[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".
id
Required
- Type: str
Full id of resource to move to, e.g. "aws_s3_bucket.example".
reset_input
reset_triggers_replace
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_terraform_resource | No description. |
generate_config_for_import | Generates CDKTF code for importing a Data resource upon running "cdktf plan < stack-name >". |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_terraform_resource
x
Required
- Type: typing.Any
generate_config_for_import
Generates CDKTF code for importing a Data resource upon running "cdktf plan < stack-name >".
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
import_to_id
Required
- Type: str
The construct id used in the generated config for the Data to import.
import_from_id
Required
- Type: str
The id of the existing Data that should be imported.
Refer to the {@link https://terraform.io/providers/builtin/terraform/latest/docs/resources/data#import import section} in the documentation of this resource for the id to use
provider
Optional
- Type: TerraformProvider
? Optional instance of the provider where the Data to import is found.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
terraform_meta_arguments | typing.Mapping[typing.Any] | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[str] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
id | str | No description. |
output | AnyMap | No description. |
input_input | typing.Mapping[typing.Any] | No description. |
triggers_replace_input | typing.Mapping[typing.Any] | No description. |
input | typing.Mapping[typing.Any] | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
triggers_replace | typing.Mapping[typing.Any] | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
terraform_meta_arguments
Required
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[str]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
id
Required
- Type: str
output
Required
- Type: AnyMap
input_input
Optional
- Type: typing.Mapping[typing.Any]
triggers_replace_input
Optional
- Type: typing.Mapping[typing.Any]
input
Required
- Type: typing.Mapping[typing.Any]
(Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#input
triggers_replace
Required
- Type: typing.Mapping[typing.Any]
(Optional) A value which is stored in the instance state, and will force replacement when the value changes.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteState
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
organization | str | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | str | No description. |
token | str | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
organization
Required
- Type: str
workspaces
Required
- Type: IRemoteWorkspace
hostname
Optional
- Type: str
token
Optional
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateAzurerm
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
container_name | str | (Required) The Name of the Storage Container within the Storage Account. |
key | str | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storage_account_name | str | (Required) The Name of the Storage Account. |
access_key | str | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
client_certificate_password | str | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
client_certificate_path | str | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
client_id | str | (Optional) The Client ID of the Service Principal. |
client_secret | str | (Optional) The Client Secret of the Service Principal. |
endpoint | str | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | str | (Optional) The Azure Environment which should be used. |
metadata_host | str | (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.). |
msi_endpoint | str | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidc_request_token | str | (Optional) The bearer token for the request to the OIDC provider. |
oidc_request_url | str | (Optional) The URL for the OIDC provider from which to request an ID token. |
oidc_token | str | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
oidc_token_file_path | str | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
resource_group_name | str | (Required) The Name of the Resource Group in which the Storage Account exists. |
sas_token | str | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | bool | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscription_id | str | (Optional) The Subscription ID in which the Storage Account exists. |
tenant_id | str | (Optional) The Tenant ID in which the Subscription exists. |
use_azuread_auth | bool | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
use_microsoft_graph | bool | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
use_msi | bool | (Optional) Should Managed Service Identity authentication be used? |
use_oidc | bool | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
container_name
Required
- Type: str
(Required) The Name of the Storage Container within the Storage Account.
key
Required
- Type: str
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storage_account_name
Required
- Type: str
(Required) The Name of the Storage Account.
access_key
Optional
- Type: str
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
client_certificate_password
Optional
- Type: str
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
client_certificate_path
Optional
- Type: str
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
client_id
Optional
- Type: str
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
client_secret
Optional
- Type: str
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
environment
Optional
- Type: str
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
metadata_host
Optional
- Type: str
(Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.).
msi_endpoint
Optional
- Type: str
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
oidc_request_token
Optional
- Type: str
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
oidc_request_url
Optional
- Type: str
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
oidc_token
Optional
- Type: str
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
oidc_token_file_path
Optional
- Type: str
(Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN_FILE_PATH environment variable.
resource_group_name
Optional
- Type: str
(Required) The Name of the Resource Group in which the Storage Account exists.
sas_token
Optional
- Type: str
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
snapshot
Optional
- Type: bool
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
subscription_id
Optional
- Type: str
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenant_id
Optional
- Type: str
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
use_azuread_auth
Optional
- Type: bool
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
use_microsoft_graph
Optional
- Type: bool
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
use_msi
Optional
- Type: bool
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
use_oidc
Optional
- Type: bool
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateConsul
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
access_token | str | (Required) Access token. |
path | str | (Required) Path in the Consul KV store. |
address | str | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
ca_file | str | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
cert_file | str | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
datacenter | str | (Optional) The datacenter to use. |
gzip | bool | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
http_auth | str | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
key_file | str | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
lock | bool | (Optional) false to disable locking. |
scheme | str | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
access_token
Required
- Type: str
(Required) Access token.
path
Required
- Type: str
(Required) Path in the Consul KV store.
address
Optional
- Type: str
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
ca_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
cert_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenter
Optional
- Type: str
(Optional) The datacenter to use.
Defaults to that of the agent.
gzip
Optional
- Type: bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
http_auth
Optional
- Type: str
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
key_file
Optional
- Type: str
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lock
Optional
- Type: bool
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
scheme
Optional
- Type: str
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateCos
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | (Required) The name of the COS bucket. |
accelerate | bool | (Optional) Whether to enable global Acceleration. |
acl | str | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
assume_role | CosBackendAssumeRole | (Optional) The assume_role block. |
domain | str | (Optional) The root domain of the API request. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) The Custom Endpoint for the COS backend. |
key | str | (Optional) The path for saving the state file in bucket. |
prefix | str | (Optional) The directory for saving the state file in bucket. |
region | str | (Optional) The region of the COS bucket. |
secret_id | str | (Optional) Secret id of Tencent Cloud. |
secret_key | str | (Optional) Secret key of Tencent Cloud. |
security_token | str | (Optional) TencentCloud Security Token of temporary access credentials. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
(Required) The name of the COS bucket.
You shall manually create it first.
accelerate
Optional
- Type: bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assume_role
Optional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
- Type: str
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
key
Optional
- Type: str
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The directory for saving the state file in bucket.
Default to "env:".
region
Optional
- Type: str
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secret_id
Optional
- Type: str
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secret_key
Optional
- Type: str
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
security_token
Optional
- Type: str
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateGcs
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | (Required) The name of the GCS bucket. |
access_token | str | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
credentials | str | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryption_key | str | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonate_service_account | str | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonate_service_account_delegates | typing.List[str] | (Optional) The delegation chain for an impersonating a service account. |
kms_encryption_key | str | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
prefix | str | (Optional) GCS prefix inside the bucket. |
storeage_custom_endpoint | str | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
(Required) The name of the GCS bucket.
This name must be globally unique.
access_token
Optional
- Type: str
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
credentials
Optional
- Type: str
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
encryption_key
Optional
- Type: str
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonate_service_account
Optional
- Type: str
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
impersonate_service_account_delegates
Optional
- Type: typing.List[str]
(Optional) The delegation chain for an impersonating a service account.
kms_encryption_key
Optional
- Type: str
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
prefix
Optional
- Type: str
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeage_custom_endpoint
Optional
- Type: str
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateHttp
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
address | str | (Required) The address of the REST endpoint. |
client_ca_certificate_pem | str | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
client_certificate_pem | str | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
client_private_key_pem | str | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
lock_address | str | (Optional) The address of the lock REST endpoint. |
lock_method | str | (Optional) The HTTP method to use when locking. |
password | str | (Optional) The password for HTTP basic authentication. |
retry_max | typing.Union[int, float] | (Optional) The number of HTTP request retries. |
retry_wait_max | typing.Union[int, float] | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retry_wait_min | typing.Union[int, float] | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skip_cert_verification | bool | (Optional) Whether to skip TLS verification. |
unlock_address | str | (Optional) The address of the unlock REST endpoint. |
unlock_method | str | (Optional) The HTTP method to use when unlocking. |
update_method | str | (Optional) HTTP method to use when updating state. |
username | str | (Optional) The username for HTTP basic authentication. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
address
Required
- Type: str
(Required) The address of the REST endpoint.
client_ca_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
client_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
client_private_key_pem
Optional
- Type: str
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lock_address
Optional
- Type: str
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lock_method
Optional
- Type: str
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
- Type: str
(Optional) The password for HTTP basic authentication.
retry_max
Optional
- Type: typing.Union[int, float]
(Optional) The number of HTTP request retries.
Defaults to 2.
retry_wait_max
Optional
- Type: typing.Union[int, float]
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retry_wait_min
Optional
- Type: typing.Union[int, float]
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skip_cert_verification
Optional
- Type: bool
(Optional) Whether to skip TLS verification.
Defaults to false.
unlock_address
Optional
- Type: str
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlock_method
Optional
- Type: str
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
update_method
Optional
- Type: str
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
- Type: str
(Optional) The username for HTTP basic authentication.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateLocal
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
path | str | Path where the state file is stored. |
workspace_dir | str | (Optional) The path to non-default workspaces. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
path
Optional
- Type: str
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspace_dir
Optional
- Type: str
(Optional) The path to non-default workspaces.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateOss
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | (Required) The name of the OSS bucket. |
access_key | str | (Optional) Alibaba Cloud access key. |
acl | str | (Optional) Object ACL to be applied to the state file. |
assume_role | OssAssumeRole | No description. |
assume_role_policy | str | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
assume_role_role_arn | str | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
assume_role_session_expiration | typing.Union[int, float] | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
assume_role_session_name | str | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
ecs_role_name | str | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) A custom endpoint for the OSS API. |
key | str | (Optional) The name of the state file. |
prefix | str | (Optional) The path directory of the state file will be stored. |
profile | str | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
region | str | (Optional) The region of the OSS bucket. |
secret_key | str | (Optional) Alibaba Cloud secret access key. |
security_token | str | (Optional) STS access token. |
shared_credentials_file | str | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
sts_endpoint | str | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
tablestore_endpoint | str | (Optional) A custom endpoint for the TableStore API. |
tablestore_table | str | (Optional) A TableStore table for state locking and consistency. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
(Required) The name of the OSS bucket.
access_key
Optional
- Type: str
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file.
assume_role
Optional
assume_role
Deprecated: Use flattened assume role options
Type: OssAssumeRole
assume_role_policy
Optional
- Type: str
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
assume_role_role_arn
Optional
- Type: str
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
assume_role_session_expiration
Optional
- Type: typing.Union[int, float]
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
assume_role_session_name
Optional
- Type: str
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
ecs_role_name
Optional
- Type: str
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
- Type: str
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
region
Optional
- Type: str
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secret_key
Optional
- Type: str
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
security_token
Optional
- Type: str
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
shared_credentials_file
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
sts_endpoint
Optional
- Type: str
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
tablestore_endpoint
Optional
- Type: str
(Optional) A custom endpoint for the TableStore API.
tablestore_table
Optional
- Type: str
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type String.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStatePg
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
conn_str | str | Postgres connection string; |
schema_name | str | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
skip_index_creation | bool | If set to true, the Postgres index must already exist. |
skip_schema_creation | bool | If set to true, the Postgres schema must already exist. |
skip_table_creation | bool | If set to true, the Postgres table must already exist. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
conn_str
Required
- Type: str
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
schema_name
Optional
- Type: str
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
skip_index_creation
Optional
- Type: bool
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
skip_schema_creation
Optional
- Type: bool
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
skip_table_creation
Optional
- Type: bool
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateS3
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | Name of the S3 Bucket. |
key | str | Path to the state file inside the S3 Bucket. |
access_key | str | (Optional) AWS access key. |
acl | str | (Optional) Canned ACL to be applied to the state file. |
allowed_account_ids | str | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
assume_role | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
assume_role_policy | str | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assume_role_policy_arns | typing.List[str] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assume_role_tags | typing.Mapping[str] | (Optional) Map of assume role session tags. |
assume_role_transitive_tag_keys | typing.List[str] | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
assume_role_with_web_identity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
custom_ca_bundle | str | (Optional) File containing custom root and intermediate certificates. |
dynamodb_endpoint | str | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodb_table | str | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
ec2_metadata_service_endpoint | str | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
ec2_metadata_service_endpoint_mode | str | (Optional) Mode to use in communicating with the metadata service. |
encrypt | bool | (Optional) Enable server side encryption of the state file. |
endpoint | str | (Optional) Custom endpoint for the AWS S3 API. |
endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
external_id | str | (Optional) External identifier to use when assuming the role. |
forbidden_account_ids | str | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
force_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
http_proxy | str | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
https_proxy | str | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
iam_endpoint | str | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
insecure | bool | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
kms_key_id | str | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
max_retries | typing.Union[int, float] | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
no_proxy | str | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
profile | str | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | str | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
retry_mode | str | (Optional) Specifies how retries are attempted. |
role_arn | str | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secret_key | str | (Optional) AWS secret access key. |
session_name | str | (Optional) Session name to use when assuming the role. |
shared_config_files | typing.List[str] | (Optional) List of paths to AWS shared configuration files. |
shared_credentials_file | str | (Optional) Path to the AWS shared credentials file. |
shared_credentials_files | typing.List[str] | (Optional) List of paths to AWS shared credentials files. |
skip_credentials_validation | bool | (Optional) Skip credentials validation via the STS API. |
skip_metadata_api_check | bool | (Optional) Skip usage of EC2 Metadata API. |
skip_region_validation | bool | (Optional) Skip validation of provided region name. |
skip_requesting_account_id | bool | (Optional) Whether to skip requesting the account ID. |
skip_s3_checksum | bool | (Optional) Do not include checksum when uploading S3 Objects. |
sse_customer_key | str | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
sts_endpoint | str | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
sts_region | str | (Optional) AWS region for STS. |
token | str | (Optional) Multi-Factor Authentication (MFA) token. |
use_legacy_workflow | bool | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
use_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
workspace_key_prefix | str | (Optional) Prefix applied to the state path inside the bucket. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
Name of the S3 Bucket.
key
Required
- Type: str
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
access_key
Optional
- Type: str
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
acl
Optional
- Type: str
(Optional) Canned ACL to be applied to the state file.
allowed_account_ids
Optional
- Type: str
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
assume_role
Optional
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
assume_role_policy
Optional
assume_role_policy
Deprecated: Use assumeRole.policy instead.
Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assume_role_policy_arns
Optional
assume_role_policy_arns
Deprecated: Use assumeRole.policyArns instead.
Type: typing.List[str]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assume_role_tags
Optional
assume_role_tags
Deprecated: Use assumeRole.tags instead.
Type: typing.Mapping[str]
(Optional) Map of assume role session tags.
assume_role_transitive_tag_keys
Optional
assume_role_transitive_tag_keys
Deprecated: Use assumeRole.transitiveTagKeys instead.
Type: typing.List[str]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
assume_role_with_web_identity
Optional
Assume Role With Web Identity Configuration.
custom_ca_bundle
Optional
- Type: str
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
dynamodb_endpoint
Optional
dynamodb_endpoint
Deprecated: Use endpoints.dynamodb instead
Type: str
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodb_table
Optional
- Type: str
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
ec2_metadata_service_endpoint
Optional
- Type: str
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
ec2_metadata_service_endpoint_mode
Optional
- Type: str
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
encrypt
Optional
- Type: bool
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
Deprecated: Use endpoints.s3 instead
Type: str
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
external_id
Optional
external_id
Deprecated: Use assume_role.external_id instead.
Type: str
(Optional) External identifier to use when assuming the role.
forbidden_account_ids
Optional
- Type: str
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
force_path_style
Optional
force_path_style
Deprecated: Use usePathStyle instead
Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
http_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
https_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
iam_endpoint
Optional
iam_endpoint
Deprecated: Use endpoints.iam instead
Type: str
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
insecure
Optional
- Type: bool
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kms_key_id
Optional
- Type: str
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
max_retries
Optional
- Type: typing.Union[int, float]
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
no_proxy
Optional
- Type: str
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
profile
Optional
- Type: str
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
region
Optional
- Type: str
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
retry_mode
Optional
- Type: str
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
role_arn
Optional
role_arn
Deprecated: Use assumeRole.roleArn instead.
Type: str
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secret_key
Optional
- Type: str
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
session_name
Optional
session_name
Deprecated: Use assumeRole.sessionName instead.
Type: str
(Optional) Session name to use when assuming the role.
shared_config_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
shared_credentials_file
Optional
- Type: str
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
shared_credentials_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skip_credentials_validation
Optional
- Type: bool
(Optional) Skip credentials validation via the STS API.
skip_metadata_api_check
Optional
- Type: bool
(Optional) Skip usage of EC2 Metadata API.
skip_region_validation
Optional
- Type: bool
(Optional) Skip validation of provided region name.
skip_requesting_account_id
Optional
- Type: bool
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
skip_s3_checksum
Optional
- Type: bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sse_customer_key
Optional
- Type: str
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
sts_endpoint
Optional
sts_endpoint
Deprecated: Use endpoints.sts instead
Type: str
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
sts_region
Optional
- Type: str
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
- Type: str
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
use_legacy_workflow
Optional
- Type: bool
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
use_path_style
Optional
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspace_key_prefix
Optional
- Type: str
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
DataTerraformRemoteStateSwift
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
container | str | No description. |
application_credential_id | str | No description. |
application_credential_name | str | No description. |
application_credential_secret | str | No description. |
archive_container | str | No description. |
auth_url | str | No description. |
cacert_file | str | No description. |
cert | str | No description. |
cloud | str | No description. |
default_domain | str | No description. |
domain_id | str | No description. |
domain_name | str | No description. |
expire_after | str | No description. |
insecure | bool | No description. |
key | str | No description. |
password | str | No description. |
project_domain_id | str | No description. |
project_domain_name | str | No description. |
region_name | str | No description. |
state_name | str | No description. |
tenant_id | str | No description. |
tenant_name | str | No description. |
token | str | No description. |
user_domain_id | str | No description. |
user_domain_name | str | No description. |
user_id | str | No description. |
user_name | str | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
defaults
Optional
defaults
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: typing.Mapping[typing.Any]
workspace
Optional
workspace
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
container
Required
container
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
application_credential_id
Optional
application_credential_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
application_credential_name
Optional
application_credential_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
application_credential_secret
Optional
application_credential_secret
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
archive_container
Optional
archive_container
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
auth_url
Optional
auth_url
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
cacert_file
Optional
cacert_file
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
cert
Optional
cert
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
cloud
Optional
cloud
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
default_domain
Optional
default_domain
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
domain_id
Optional
domain_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
domain_name
Optional
domain_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
expire_after
Optional
expire_after
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
insecure
Optional
insecure
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: bool
key
Optional
key
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
password
Optional
password
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
project_domain_id
Optional
project_domain_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
project_domain_name
Optional
project_domain_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
region_name
Optional
region_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
state_name
Optional
state_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
tenant_id
Optional
tenant_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
tenant_name
Optional
tenant_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
token
Optional
token
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_domain_id
Optional
user_domain_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_domain_name
Optional
user_domain_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_id
Optional
user_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_name
Optional
user_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
to_string
Returns a string representation of this construct.
add_override
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- Type: str
The new logical ID to use for this stack element.
reset_override_logical_id
reset_override_logical_id
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
to_hcl_terraform
Adds this resource to the terraform JSON output.
to_metadata
to_metadata
to_terraform
to_terraform
Adds this resource to the terraform JSON output.
get
get
output
Required
- Type: str
get_boolean
get_boolean
output
Required
- Type: str
get_list
get_list
output
Required
- Type: str
get_number
get_number
output
Required
- Type: str
get_string
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
node
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: TerraformStack
fqn
Required
fqn
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
friendly_unique_id
Required
friendly_unique_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
GcsBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
bucket | str | (Required) The name of the GCS bucket. |
access_token | str | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
credentials | str | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryption_key | str | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonate_service_account | str | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonate_service_account_delegates | typing.List[str] | (Optional) The delegation chain for an impersonating a service account. |
kms_encryption_key | str | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
prefix | str | (Optional) GCS prefix inside the bucket. |
storeage_custom_endpoint | str | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
scope
Required
- Type: constructs.Construct
bucket
Required
- Type: str
(Required) The name of the GCS bucket.
This name must be globally unique.
access_token
Optional
- Type: str
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
credentials
Optional
- Type: str
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
encryption_key
Optional
- Type: str
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonate_service_account
Optional
- Type: str
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
impersonate_service_account_delegates
Optional
- Type: typing.List[str]
(Optional) The delegation chain for an impersonating a service account.
kms_encryption_key
Optional
- Type: str
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
prefix
Optional
- Type: str
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeage_custom_endpoint
Optional
- Type: str
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
HttpBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
address | str | (Required) The address of the REST endpoint. |
client_ca_certificate_pem | str | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
client_certificate_pem | str | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
client_private_key_pem | str | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
lock_address | str | (Optional) The address of the lock REST endpoint. |
lock_method | str | (Optional) The HTTP method to use when locking. |
password | str | (Optional) The password for HTTP basic authentication. |
retry_max | typing.Union[int, float] | (Optional) The number of HTTP request retries. |
retry_wait_max | typing.Union[int, float] | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retry_wait_min | typing.Union[int, float] | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skip_cert_verification | bool | (Optional) Whether to skip TLS verification. |
unlock_address | str | (Optional) The address of the unlock REST endpoint. |
unlock_method | str | (Optional) The HTTP method to use when unlocking. |
update_method | str | (Optional) HTTP method to use when updating state. |
username | str | (Optional) The username for HTTP basic authentication. |
scope
Required
- Type: constructs.Construct
address
Required
- Type: str
(Required) The address of the REST endpoint.
client_ca_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
client_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
client_private_key_pem
Optional
- Type: str
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lock_address
Optional
- Type: str
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lock_method
Optional
- Type: str
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
- Type: str
(Optional) The password for HTTP basic authentication.
retry_max
Optional
- Type: typing.Union[int, float]
(Optional) The number of HTTP request retries.
Defaults to 2.
retry_wait_max
Optional
- Type: typing.Union[int, float]
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retry_wait_min
Optional
- Type: typing.Union[int, float]
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skip_cert_verification
Optional
- Type: bool
(Optional) Whether to skip TLS verification.
Defaults to false.
unlock_address
Optional
- Type: str
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlock_method
Optional
- Type: str
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
update_method
Optional
- Type: str
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
- Type: str
(Optional) The username for HTTP basic authentication.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
ImportableResource
Class used to represent an importable resource.
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
name | str | No description. |
config | IImportableConfig | No description. |
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
config
Required
- Type: IImportableConfig
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
LocalBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
path | str | Path where the state file is stored. |
workspace_dir | str | (Optional) The path to non-default workspaces. |
scope
Required
- Type: constructs.Construct
path
Optional
- Type: str
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspace_dir
Optional
- Type: str
(Optional) The path to non-default workspaces.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
from_stack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
OssBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
bucket | str | (Required) The name of the OSS bucket. |
access_key | str | (Optional) Alibaba Cloud access key. |
acl | str | (Optional) Object ACL to be applied to the state file. |
assume_role | OssAssumeRole | No description. |
assume_role_policy | str | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
assume_role_role_arn | str | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
assume_role_session_expiration | typing.Union[int, float] | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
assume_role_session_name | str | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
ecs_role_name | str | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) A custom endpoint for the OSS API. |
key | str | (Optional) The name of the state file. |
prefix | str | (Optional) The path directory of the state file will be stored. |
profile | str | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
region | str | (Optional) The region of the OSS bucket. |
secret_key | str | (Optional) Alibaba Cloud secret access key. |
security_token | str | (Optional) STS access token. |
shared_credentials_file | str | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
sts_endpoint | str | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
tablestore_endpoint | str | (Optional) A custom endpoint for the TableStore API. |
tablestore_table | str | (Optional) A TableStore table for state locking and consistency. |
scope
Required
- Type: constructs.Construct
bucket
Required
- Type: str
(Required) The name of the OSS bucket.
access_key
Optional
- Type: str
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file.
assume_role
Optional
assume_role
Deprecated: Use flattened assume role options
Type: OssAssumeRole
assume_role_policy
Optional
- Type: str
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
assume_role_role_arn
Optional
- Type: str
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
assume_role_session_expiration
Optional
- Type: typing.Union[int, float]
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
assume_role_session_name
Optional
- Type: str
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
ecs_role_name
Optional
- Type: str
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
- Type: str
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
region
Optional
- Type: str
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secret_key
Optional
- Type: str
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
security_token
Optional
- Type: str
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
shared_credentials_file
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
sts_endpoint
Optional
- Type: str
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
tablestore_endpoint
Optional
- Type: str
(Optional) A custom endpoint for the TableStore API.
tablestore_table
Optional
- Type: str
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type String.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
PgBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
conn_str | str | Postgres connection string; |
schema_name | str | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
skip_index_creation | bool | If set to true, the Postgres index must already exist. |
skip_schema_creation | bool | If set to true, the Postgres schema must already exist. |
skip_table_creation | bool | If set to true, the Postgres table must already exist. |
scope
Required
- Type: constructs.Construct
conn_str
Required
- Type: str
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
schema_name
Optional
- Type: str
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
skip_index_creation
Optional
- Type: bool
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
skip_schema_creation
Optional
- Type: bool
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
skip_table_creation
Optional
- Type: bool
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
RemoteBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
organization | str | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | str | No description. |
token | str | No description. |
scope
Required
- Type: constructs.Construct
organization
Required
- Type: str
workspaces
Required
- Type: IRemoteWorkspace
hostname
Optional
- Type: str
token
Optional
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Resource
- Implements: IResource
A construct which represents a resource.
Initializers
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
to_string
to_string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_construct
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.
x
Required
- Type: typing.Any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stack | TerraformStack | The stack in which this resource is defined. |
node
Required
node
- Deprecated: - Please use Construct from the constructs package instead.
- Type: constructs.Node
The tree node.
stack
Required
stack
- Deprecated: - Please use Construct from the constructs package instead.
- Type: TerraformStack
The stack in which this resource is defined.
S3Backend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
bucket | str | Name of the S3 Bucket. |
key | str | Path to the state file inside the S3 Bucket. |
access_key | str | (Optional) AWS access key. |
acl | str | (Optional) Canned ACL to be applied to the state file. |
allowed_account_ids | str | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
assume_role | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
assume_role_policy | str | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assume_role_policy_arns | typing.List[str] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assume_role_tags | typing.Mapping[str] | (Optional) Map of assume role session tags. |
assume_role_transitive_tag_keys | typing.List[str] | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
assume_role_with_web_identity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
custom_ca_bundle | str | (Optional) File containing custom root and intermediate certificates. |
dynamodb_endpoint | str | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodb_table | str | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
ec2_metadata_service_endpoint | str | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
ec2_metadata_service_endpoint_mode | str | (Optional) Mode to use in communicating with the metadata service. |
encrypt | bool | (Optional) Enable server side encryption of the state file. |
endpoint | str | (Optional) Custom endpoint for the AWS S3 API. |
endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
external_id | str | (Optional) External identifier to use when assuming the role. |
forbidden_account_ids | str | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
force_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
http_proxy | str | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
https_proxy | str | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
iam_endpoint | str | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
insecure | bool | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
kms_key_id | str | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
max_retries | typing.Union[int, float] | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
no_proxy | str | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
profile | str | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | str | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
retry_mode | str | (Optional) Specifies how retries are attempted. |
role_arn | str | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secret_key | str | (Optional) AWS secret access key. |
session_name | str | (Optional) Session name to use when assuming the role. |
shared_config_files | typing.List[str] | (Optional) List of paths to AWS shared configuration files. |
shared_credentials_file | str | (Optional) Path to the AWS shared credentials file. |
shared_credentials_files | typing.List[str] | (Optional) List of paths to AWS shared credentials files. |
skip_credentials_validation | bool | (Optional) Skip credentials validation via the STS API. |
skip_metadata_api_check | bool | (Optional) Skip usage of EC2 Metadata API. |
skip_region_validation | bool | (Optional) Skip validation of provided region name. |
skip_requesting_account_id | bool | (Optional) Whether to skip requesting the account ID. |
skip_s3_checksum | bool | (Optional) Do not include checksum when uploading S3 Objects. |
sse_customer_key | str | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
sts_endpoint | str | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
sts_region | str | (Optional) AWS region for STS. |
token | str | (Optional) Multi-Factor Authentication (MFA) token. |
use_legacy_workflow | bool | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
use_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
workspace_key_prefix | str | (Optional) Prefix applied to the state path inside the bucket. |
scope
Required
- Type: constructs.Construct
bucket
Required
- Type: str
Name of the S3 Bucket.
key
Required
- Type: str
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
access_key
Optional
- Type: str
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
acl
Optional
- Type: str
(Optional) Canned ACL to be applied to the state file.
allowed_account_ids
Optional
- Type: str
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
assume_role
Optional
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
assume_role_policy
Optional
assume_role_policy
Deprecated: Use assumeRole.policy instead.
Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assume_role_policy_arns
Optional
assume_role_policy_arns
Deprecated: Use assumeRole.policyArns instead.
Type: typing.List[str]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assume_role_tags
Optional
assume_role_tags
Deprecated: Use assumeRole.tags instead.
Type: typing.Mapping[str]
(Optional) Map of assume role session tags.
assume_role_transitive_tag_keys
Optional
assume_role_transitive_tag_keys
Deprecated: Use assumeRole.transitiveTagKeys instead.
Type: typing.List[str]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
assume_role_with_web_identity
Optional
Assume Role With Web Identity Configuration.
custom_ca_bundle
Optional
- Type: str
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
dynamodb_endpoint
Optional
dynamodb_endpoint
Deprecated: Use endpoints.dynamodb instead
Type: str
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodb_table
Optional
- Type: str
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
ec2_metadata_service_endpoint
Optional
- Type: str
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
ec2_metadata_service_endpoint_mode
Optional
- Type: str
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
encrypt
Optional
- Type: bool
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
Deprecated: Use endpoints.s3 instead
Type: str
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
external_id
Optional
external_id
Deprecated: Use assume_role.external_id instead.
Type: str
(Optional) External identifier to use when assuming the role.
forbidden_account_ids
Optional
- Type: str
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
force_path_style
Optional
force_path_style
Deprecated: Use usePathStyle instead
Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
http_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
https_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
iam_endpoint
Optional
iam_endpoint
Deprecated: Use endpoints.iam instead
Type: str
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
insecure
Optional
- Type: bool
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kms_key_id
Optional
- Type: str
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
max_retries
Optional
- Type: typing.Union[int, float]
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
no_proxy
Optional
- Type: str
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
profile
Optional
- Type: str
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
region
Optional
- Type: str
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
retry_mode
Optional
- Type: str
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
role_arn
Optional
role_arn
Deprecated: Use assumeRole.roleArn instead.
Type: str
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secret_key
Optional
- Type: str
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
session_name
Optional
session_name
Deprecated: Use assumeRole.sessionName instead.
Type: str
(Optional) Session name to use when assuming the role.
shared_config_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
shared_credentials_file
Optional
- Type: str
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
shared_credentials_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skip_credentials_validation
Optional
- Type: bool
(Optional) Skip credentials validation via the STS API.
skip_metadata_api_check
Optional
- Type: bool
(Optional) Skip usage of EC2 Metadata API.
skip_region_validation
Optional
- Type: bool
(Optional) Skip validation of provided region name.
skip_requesting_account_id
Optional
- Type: bool
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
skip_s3_checksum
Optional
- Type: bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sse_customer_key
Optional
- Type: str
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
sts_endpoint
Optional
sts_endpoint
Deprecated: Use endpoints.sts instead
Type: str
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
sts_region
Optional
- Type: str
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
- Type: str
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
use_legacy_workflow
Optional
- Type: bool
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
use_path_style
Optional
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspace_key_prefix
Optional
- Type: str
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
SwiftBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
container | str | No description. |
application_credential_id | str | No description. |
application_credential_name | str | No description. |
application_credential_secret | str | No description. |
archive_container | str | No description. |
auth_url | str | No description. |
cacert_file | str | No description. |
cert | str | No description. |
cloud | str | No description. |
default_domain | str | No description. |
domain_id | str | No description. |
domain_name | str | No description. |
expire_after | str | No description. |
insecure | bool | No description. |
key | str | No description. |
password | str | No description. |
project_domain_id | str | No description. |
project_domain_name | str | No description. |
region_name | str | No description. |
state_name | str | No description. |
tenant_id | str | No description. |
tenant_name | str | No description. |
token | str | No description. |
user_domain_id | str | No description. |
user_domain_name | str | No description. |
user_id | str | No description. |
user_name | str | No description. |
scope
Required
- Type: constructs.Construct
container
Required
container
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
application_credential_id
Optional
application_credential_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
application_credential_name
Optional
application_credential_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
application_credential_secret
Optional
application_credential_secret
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
archive_container
Optional
archive_container
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
auth_url
Optional
auth_url
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
cacert_file
Optional
cacert_file
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
cert
Optional
cert
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
cloud
Optional
cloud
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
default_domain
Optional
default_domain
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
domain_id
Optional
domain_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
domain_name
Optional
domain_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
expire_after
Optional
expire_after
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
insecure
Optional
insecure
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: bool
key
Optional
key
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
password
Optional
password
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
project_domain_id
Optional
project_domain_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
project_domain_name
Optional
project_domain_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
region_name
Optional
region_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
state_name
Optional
state_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
tenant_id
Optional
tenant_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
tenant_name
Optional
tenant_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
token
Optional
token
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_domain_id
Optional
user_domain_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_domain_name
Optional
user_domain_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_id
Optional
user_id
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
user_name
Optional
user_name
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
to_string
Returns a string representation of this construct.
add_override
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- Type: str
The new logical ID to use for this stack element.
reset_override_logical_id
reset_override_logical_id
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
to_hcl_terraform
to_metadata
to_metadata
to_terraform
to_terraform
Adds this resource to the terraform JSON output.
get_remote_state_data_source
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
_fromstack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
is_construct
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
is_terraform_element
x
Required
- Type: typing.Any
is_backend
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
node
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: TerraformStack
fqn
Required
fqn
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
friendly_unique_id
Required
friendly_unique_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
TerraformAsset
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
path | str | No description. |
asset_hash | str | No description. |
type | AssetType | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
path
Required
- Type: str
asset_hash
Optional
- Type: str
type
Optional
- Type: AssetType
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
to_string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
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.
x
Required
- Type: typing.Any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
file_name | str | Name of the asset. |
path | str | The path relative to the root of the terraform directory in posix format Use this property to reference the asset. |
asset_hash | str | No description. |
type | AssetType | No description. |
node
Required
- Type: constructs.Node
The tree node.
file_name
Required
- Type: str
Name of the asset.
path
Required
- Type: str
The path relative to the root of the terraform directory in posix format Use this property to reference the asset.
asset_hash
Required
- Type: str
type
Required
- Type: AssetType
TerraformBackend
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
name | str | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
name
Required
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_remote_state_data_source | Creates a TerraformRemoteState resource that accesses this backend. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
get_remote_state_data_source
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: constructs.Construct
name
Required
- Type: str
from_stack
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_backend | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_backend
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
TerraformDataSource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get_any_map_attribute | No description. |
get_boolean_attribute | No description. |
get_boolean_map_attribute | No description. |
get_list_attribute | No description. |
get_number_attribute | No description. |
get_number_list_attribute | No description. |
get_number_map_attribute | No description. |
get_string_attribute | No description. |
get_string_map_attribute | No description. |
interpolation_for_attribute | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get_any_map_attribute
terraform_attribute
Required
- Type: str
get_boolean_attribute
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
terraform_attribute
Required
- Type: str
get_list_attribute
terraform_attribute
Required
- Type: str
get_number_attribute
terraform_attribute
Required
- Type: str
get_number_list_attribute
terraform_attribute
Required
- Type: str
get_number_map_attribute
terraform_attribute
Required
- Type: str
get_string_attribute
terraform_attribute
Required
- Type: str
get_string_map_attribute
terraform_attribute
Required
- Type: str
interpolation_for_attribute
terraform_attribute
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_terraform_data_source | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_terraform_data_source
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
terraform_meta_arguments | typing.Mapping[typing.Any] | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[str] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
terraform_meta_arguments
Required
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[str]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
TerraformElement
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
element_type | str | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
element_type
Optional
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
TerraformHclModule
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | No description. |
skip_asset_creation_from_local_modules | bool | No description. |
source | str | No description. |
version | str | No description. |
variables | typing.Mapping[typing.Any] | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
providers
Optional
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
- Type: bool
source
Required
- Type: str
version
Optional
- Type: str
variables
Optional
- Type: typing.Mapping[typing.Any]
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | No description. |
add_provider | No description. |
get_string | No description. |
interpolation_for_output | No description. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
set | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
add_provider
provider
Required
- Type: typing.Union[TerraformProvider, TerraformModuleProvider]
get_string
output
Required
- Type: str
interpolation_for_output
module_output
Required
- Type: str
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
set
variable
Required
- Type: str
value
Required
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
source | str | No description. |
providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | No description. |
skip_asset_creation_from_local_modules | bool | No description. |
version | str | No description. |
depends_on | typing.List[str] | No description. |
for_each | ITerraformIterator | No description. |
variables | typing.Mapping[typing.Any] | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
source
Required
- Type: str
providers
Optional
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
- Type: bool
version
Optional
- Type: str
depends_on
Optional
- Type: typing.List[str]
for_each
Optional
- Type: ITerraformIterator
variables
Optional
- Type: typing.Mapping[typing.Any]
TerraformLocal
- Implements: ITerraformAddressable
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
expression | typing.Any | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
expression
Required
- Type: typing.Any
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
as_any_map | typing.Mapping[typing.Any] | No description. |
as_boolean | IResolvable | No description. |
as_boolean_map | typing.Mapping[bool] | No description. |
as_list | typing.List[str] | No description. |
as_number | typing.Union[int, float] | No description. |
as_number_map | typing.Mapping[typing.Union[int, float]] | No description. |
as_string | str | No description. |
as_string_map | typing.Mapping[str] | No description. |
expression | typing.Any | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
as_any_map
Required
- Type: typing.Mapping[typing.Any]
as_boolean
Required
- Type: IResolvable
as_boolean_map
Required
- Type: typing.Mapping[bool]
as_list
Required
- Type: typing.List[str]
as_number
Required
- Type: typing.Union[int, float]
as_number_map
Required
- Type: typing.Mapping[typing.Union[int, float]]
as_string
Required
- Type: str
as_string_map
Required
- Type: typing.Mapping[str]
expression
Required
- Type: typing.Any
TerraformModule
- Implements: ITerraformDependable
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | No description. |
skip_asset_creation_from_local_modules | bool | No description. |
source | str | No description. |
version | str | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
providers
Optional
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
- Type: bool
source
Required
- Type: str
version
Optional
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | No description. |
add_provider | No description. |
get_string | No description. |
interpolation_for_output | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
add_provider
provider
Required
- Type: typing.Union[TerraformProvider, TerraformModuleProvider]
get_string
output
Required
- Type: str
interpolation_for_output
module_output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
source | str | No description. |
providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | No description. |
skip_asset_creation_from_local_modules | bool | No description. |
version | str | No description. |
depends_on | typing.List[str] | No description. |
for_each | ITerraformIterator | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
source
Required
- Type: str
providers
Optional
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
- Type: bool
version
Optional
- Type: str
depends_on
Optional
- Type: typing.List[str]
for_each
Optional
- Type: ITerraformIterator
TerraformOutput
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
value | typing.Any | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
description | str | No description. |
precondition | Precondition | No description. |
sensitive | bool | No description. |
static_id | bool | If set to true the synthesized Terraform Output will be named after the id passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId). |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
value
Required
- Type: typing.Any
depends_on
Optional
- Type: typing.List[ITerraformDependable]
description
Optional
- Type: str
precondition
Optional
- Type: Precondition
sensitive
Optional
- Type: bool
static_id
Optional
- Type: bool
- Default: false
If set to true the synthesized Terraform Output will be named after the id
passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId).
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_terraform_output | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_terraform_output
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
static_id | bool | No description. |
value | typing.Any | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
description | str | No description. |
precondition | Precondition | No description. |
sensitive | bool | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
static_id
Required
- Type: bool
value
Required
- Type: typing.Any
depends_on
Optional
- Type: typing.List[ITerraformDependable]
description
Optional
- Type: str
precondition
Optional
- Type: Precondition
sensitive
Optional
- Type: bool
TerraformProvider
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
terraform_provider_source | str | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
terraform_provider_source
Optional
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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.
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_terraform_provider | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_terraform_provider
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
meta_attributes | typing.Mapping[typing.Any] | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
terraform_provider_source | str | No description. |
alias | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
meta_attributes
Required
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
terraform_provider_source
Optional
- Type: str
alias
Optional
- Type: str
TerraformRemoteState
- Implements: ITerraformAddressable
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
backend | str | No description. |
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
backend
Required
- Type: str
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | Adds this resource to the terraform JSON output. |
to_metadata | No description. |
to_terraform | Adds this resource to the terraform JSON output. |
get | No description. |
get_boolean | No description. |
get_list | No description. |
get_number | No description. |
get_string | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
Adds this resource to the terraform JSON output.
to_metadata
to_terraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: str
get_boolean
output
Required
- Type: str
get_list
output
Required
- Type: str
get_number
output
Required
- Type: str
get_string
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
- Type: str
TerraformResource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
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. |
get_any_map_attribute | No description. |
get_boolean_attribute | No description. |
get_boolean_map_attribute | No description. |
get_list_attribute | No description. |
get_number_attribute | No description. |
get_number_list_attribute | No description. |
get_number_map_attribute | No description. |
get_string_attribute | No description. |
get_string_map_attribute | No description. |
has_resource_move | No description. |
import_from | No description. |
interpolation_for_attribute | No description. |
move_from_id | Move the resource corresponding to "id" to this resource. |
move_to | Moves this resource to the target resource given by moveTarget. |
move_to_id | Moves this resource to the resource corresponding to "id". |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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_target
Required
- Type: str
The string move target that will correspond to this resource.
get_any_map_attribute
terraform_attribute
Required
- Type: str
get_boolean_attribute
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
terraform_attribute
Required
- Type: str
get_list_attribute
terraform_attribute
Required
- Type: str
get_number_attribute
terraform_attribute
Required
- Type: str
get_number_list_attribute
terraform_attribute
Required
- Type: str
get_number_map_attribute
terraform_attribute
Required
- Type: str
get_string_attribute
terraform_attribute
Required
- Type: str
get_string_map_attribute
terraform_attribute
Required
- Type: str
has_resource_move
import_from
id
Required
- Type: str
provider
Optional
- Type: TerraformProvider
interpolation_for_attribute
terraform_attribute
Required
- 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.
id
Required
- 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_target
Required
- Type: str
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
index
Optional
- Type: typing.Union[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".
id
Required
- Type: str
Full id of resource to move to, e.g. "aws_s3_bucket.example".
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_terraform_resource | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
is_terraform_resource
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
terraform_meta_arguments | typing.Mapping[typing.Any] | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[str] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
terraform_meta_arguments
Required
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[str]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
TerraformStack
Initializers
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_dependency | No description. |
add_override | No description. |
all_providers | No description. |
depends_on | No description. |
ensure_backend_exists | No description. |
get_logical_id | No description. |
has_resource_move | No description. |
prepare_stack | No description. |
register_incoming_cross_stack_reference | No description. |
register_outgoing_cross_stack_reference | No description. |
run_all_validations | Run all validations on the stack. |
to_hcl_terraform | No description. |
to_terraform | No description. |
to_string
Returns a string representation of this construct.
add_dependency
dependency
Required
- Type: TerraformStack
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
all_providers
depends_on
stack
Required
- Type: TerraformStack
ensure_backend_exists
get_logical_id
tf_element
Required
- Type: typing.Union[constructs.Node, TerraformElement]
has_resource_move
prepare_stack
register_incoming_cross_stack_reference
from_stack
Required
- Type: TerraformStack
register_outgoing_cross_stack_reference
identifier
Required
- Type: str
run_all_validations
Run all validations on the stack.
to_hcl_terraform
to_terraform
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_stack | No description. |
of | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_stack
x
Required
- Type: typing.Any
of
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
dependencies | typing.List[TerraformStack] | No description. |
move_targets | TerraformResourceTargets | No description. |
synthesizer | IStackSynthesizer | No description. |
node
Required
- Type: constructs.Node
The tree node.
dependencies
Required
- Type: typing.List[TerraformStack]
move_targets
Required
- Type: TerraformResourceTargets
synthesizer
Required
- Type: IStackSynthesizer
TerraformVariable
- Implements: ITerraformAddressable
Initializers
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | str | No description. |
default | typing.Any | No description. |
description | str | No description. |
nullable | bool | No description. |
sensitive | bool | No description. |
type | str | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. |
validation | typing.List[TerraformVariableValidationConfig] | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: str
default
Optional
- Type: typing.Any
description
Optional
- Type: str
nullable
Optional
- Type: bool
sensitive
Optional
- Type: bool
type
Optional
- Type: str
The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable.
If no type constraint is set then a value of any type is accepted.
While type constraints are optional, we recommend specifying them; they serve as easy reminders for users of the module, and allow Terraform to return a helpful error message if the wrong type is used.
Type constraints are created from a mixture of type keywords and type constructors. The supported type keywords are:
- string
- number
- bool
The type constructors allow you to specify complex types such as collections:
- list(< TYPE >)
- set(< TYPE >)
- map(< TYPE >)
- object({< ATTR NAME > = < TYPE >, ... })
- tuple([< TYPE >, ...])
The keyword any may be used to indicate that any type is acceptable. For more information on the meaning and behavior of these different types, as well as detailed information about automatic conversion of complex types, refer to {@link https://developer.hashicorp.com/terraform/language/expressions/type-constraints Type Constraints}.
If both the type and default arguments are specified, the given default value must be convertible to the specified type.
validation
Optional
- Type: typing.List[TerraformVariableValidationConfig]
Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.
Methods
Name | Description |
---|---|
to_string | Returns a string representation of this construct. |
add_override | No description. |
override_logical_id | Overrides the auto-generated logical ID with a specific ID. |
reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. |
to_hcl_terraform | No description. |
to_metadata | No description. |
to_terraform | No description. |
add_validation | No description. |
synthesize_attributes | No description. |
synthesize_hcl_attributes | No description. |
to_string
Returns a string representation of this construct.
add_override
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
Overrides the auto-generated logical ID with a specific ID.
new_logical_id
Required
- 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
add_validation
condition
Required
- Type: typing.Any
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
error_message
Required
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
synthesize_attributes
synthesize_hcl_attributes
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
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.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktf_stack | TerraformStack | No description. |
fqn | str | No description. |
friendly_unique_id | str | No description. |
boolean_value | IResolvable | No description. |
list_value | typing.List[str] | No description. |
number_value | typing.Union[int, float] | No description. |
string_value | str | No description. |
value | typing.Any | No description. |
default | typing.Any | No description. |
description | str | No description. |
nullable | bool | No description. |
sensitive | bool | No description. |
type | str | No description. |
validation | typing.List[TerraformVariableValidationConfig] | No description. |
node
Required
- Type: constructs.Node
The tree node.
cdktf_stack
Required
- Type: TerraformStack
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
boolean_value
Required
- Type: IResolvable
list_value
Required
- Type: typing.List[str]
number_value
Required
- Type: typing.Union[int, float]
string_value
Required
- Type: str
value
Required
- Type: typing.Any
default
Optional
- Type: typing.Any
description
Optional
- Type: str
nullable
Optional
- Type: bool
sensitive
Optional
- Type: bool
type
Optional
- Type: str
validation
Optional
- Type: typing.List[TerraformVariableValidationConfig]
Structs
AppConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
context | typing.Mapping[typing.Any] | Additional context values for the application. |
hcl_output | bool | No description. |
outdir | str | The directory to output Terraform resources. |
skip_backend_validation | bool | Whether to skip backend validation during synthesis of the app. |
skip_validation | bool | Whether to skip all validations during synthesis of the app. |
stack_traces | bool | No description. |
context
Optional
- Type: typing.Mapping[typing.Any]
- Default: no additional context
Additional context values for the application.
Context set by the CLI or the context
key in cdktf.json
has precedence.
Context can be read from any construct using node.getContext(key)
.
hcl_output
Optional
- Type: bool
outdir
Optional
- Type: str
- Default: CDKTF_OUTDIR if defined, otherwise "cdktf.out"
The directory to output Terraform resources.
If you are using the CDKTF CLI, this value is automatically set from one of the following three sources:
- The
-o
/--output
CLI option - The
CDKTF_OUTDIR
environment variable - The
outdir
key incdktf.json
If you are using the CDKTF CLI and want to set a different value here, you will also need to set the same value via one of the three ways specified above.
The most common case to set this value is when you are using the CDKTF library directly (e.g. when writing unit tests).
skip_backend_validation
Optional
- Type: bool
- Default: false
Whether to skip backend validation during synthesis of the app.
skip_validation
Optional
- Type: bool
- Default: false
Whether to skip all validations during synthesis of the app.
stack_traces
Optional
- Type: bool
AzurermBackendConfig
Stores the state as a Blob with the given Key within the Blob Container within the Blob Storage Account.
This backend supports state locking and consistency checking with Azure Blob Storage native capabilities.
Note: By default the Azure Backend uses ADAL for authentication which is deprecated in favour of MSAL - MSAL can be used by setting use_microsoft_graph to true. The default for this will change in Terraform 1.2, so that MSAL authentication is used by default.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/azurerm
Initializer
Properties
Name | Type | Description |
---|---|---|
container_name | str | (Required) The Name of the Storage Container within the Storage Account. |
key | str | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storage_account_name | str | (Required) The Name of the Storage Account. |
access_key | str | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
client_certificate_password | str | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
client_certificate_path | str | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
client_id | str | (Optional) The Client ID of the Service Principal. |
client_secret | str | (Optional) The Client Secret of the Service Principal. |
endpoint | str | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | str | (Optional) The Azure Environment which should be used. |
metadata_host | str | (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.). |
msi_endpoint | str | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidc_request_token | str | (Optional) The bearer token for the request to the OIDC provider. |
oidc_request_url | str | (Optional) The URL for the OIDC provider from which to request an ID token. |
oidc_token | str | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
oidc_token_file_path | str | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
resource_group_name | str | (Required) The Name of the Resource Group in which the Storage Account exists. |
sas_token | str | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | bool | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscription_id | str | (Optional) The Subscription ID in which the Storage Account exists. |
tenant_id | str | (Optional) The Tenant ID in which the Subscription exists. |
use_azuread_auth | bool | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
use_microsoft_graph | bool | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
use_msi | bool | (Optional) Should Managed Service Identity authentication be used? |
use_oidc | bool | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
container_name
Required
- Type: str
(Required) The Name of the Storage Container within the Storage Account.
key
Required
- Type: str
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storage_account_name
Required
- Type: str
(Required) The Name of the Storage Account.
access_key
Optional
- Type: str
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
client_certificate_password
Optional
- Type: str
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
client_certificate_path
Optional
- Type: str
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
client_id
Optional
- Type: str
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
client_secret
Optional
- Type: str
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
environment
Optional
- Type: str
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
metadata_host
Optional
- Type: str
(Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.).
msi_endpoint
Optional
- Type: str
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
oidc_request_token
Optional
- Type: str
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
oidc_request_url
Optional
- Type: str
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
oidc_token
Optional
- Type: str
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
oidc_token_file_path
Optional
- Type: str
(Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN_FILE_PATH environment variable.
resource_group_name
Optional
- Type: str
(Required) The Name of the Resource Group in which the Storage Account exists.
sas_token
Optional
- Type: str
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
snapshot
Optional
- Type: bool
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
subscription_id
Optional
- Type: str
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenant_id
Optional
- Type: str
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
use_azuread_auth
Optional
- Type: bool
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
use_microsoft_graph
Optional
- Type: bool
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
use_msi
Optional
- Type: bool
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
use_oidc
Optional
- Type: bool
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
CloudBackendConfig
The Cloud Backend synthesizes a {@link https://developer.hashicorp.com/terraform/cli/cloud/settings#the-cloud-block cloud block}. The cloud block is a nested block within the top-level terraform settings block. It specifies which Terraform Cloud workspaces to use for the current working directory. The cloud block only affects Terraform CLI's behavior. When Terraform Cloud uses a configuration that contains a cloud block - for example, when a workspace is configured to use a VCS provider directly - it ignores the block and behaves according to its own workspace settings.
https://developer.hashicorp.com/terraform/cli/cloud/settings#arguments
Initializer
Properties
Name | Type | Description |
---|---|---|
organization | str | The name of the organization containing the workspace(s) the current configuration should use. |
workspaces | typing.Union[NamedCloudWorkspace, TaggedCloudWorkspaces] | A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration. |
hostname | str | The hostname of a Terraform Enterprise installation, if using Terraform Enterprise. |
token | str | The token used to authenticate with Terraform Cloud. |
organization
Required
- Type: str
The name of the organization containing the workspace(s) the current configuration should use.
workspaces
Required
- Type: typing.Union[NamedCloudWorkspace, TaggedCloudWorkspaces]
A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration.
The workspaces block must contain exactly one of the following arguments, each denoting a strategy for how workspaces should be mapped:
hostname
Optional
- Type: str
- Default: app.terraform.io
The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.
token
Optional
- Type: str
The token used to authenticate with Terraform Cloud.
We recommend omitting the token from the configuration, and instead using terraform login or manually configuring credentials in the CLI config file.
ConsulBackendConfig
Stores the state in the Consul KV store at a given path. This backend supports state locking.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/consul
Initializer
Properties
Name | Type | Description |
---|---|---|
access_token | str | (Required) Access token. |
path | str | (Required) Path in the Consul KV store. |
address | str | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
ca_file | str | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
cert_file | str | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
datacenter | str | (Optional) The datacenter to use. |
gzip | bool | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
http_auth | str | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
key_file | str | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
lock | bool | (Optional) false to disable locking. |
scheme | str | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
access_token
Required
- Type: str
(Required) Access token.
path
Required
- Type: str
(Required) Path in the Consul KV store.
address
Optional
- Type: str
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
ca_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
cert_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenter
Optional
- Type: str
(Optional) The datacenter to use.
Defaults to that of the agent.
gzip
Optional
- Type: bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
http_auth
Optional
- Type: str
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
key_file
Optional
- Type: str
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lock
Optional
- Type: bool
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
scheme
Optional
- Type: str
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
CosBackendAssumeRole
Initializer
Properties
Name | Type | Description |
---|---|---|
role_arn | str | (Required) The ARN of the role to assume. |
session_duration | typing.Union[int, float] | (Required) The duration of the session when making the AssumeRole call. |
session_name | str | (Required) The session name to use when making the AssumeRole call. |
policy | typing.Any | (Optional) A more restrictive policy when making the AssumeRole call. |
role_arn
Required
- Type: str
(Required) The ARN of the role to assume.
It can be sourced from the TENCENTCLOUD_ASSUME_ROLE_ARN.
session_duration
Required
- Type: typing.Union[int, float]
(Required) The duration of the session when making the AssumeRole call.
Its value ranges from 0 to 43200(seconds), and default is 7200 seconds. It can be sourced from the TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION.
session_name
Required
- Type: str
(Required) The session name to use when making the AssumeRole call.
It can be sourced from the TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME.
policy
Optional
- Type: typing.Any
(Optional) A more restrictive policy when making the AssumeRole call.
Its content must not contains principal elements. Please refer to {@link https://www.tencentcloud.com/document/product/598/10603 policies syntax logic}.
CosBackendConfig
Stores the state as an object in a configurable prefix in a given bucket on Tencent Cloud Object Storage (COS).
This backend supports state locking.
Warning! It is highly recommended that you enable Object Versioning on the COS bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/cos
Initializer
Properties
Name | Type | Description |
---|---|---|
bucket | str | (Required) The name of the COS bucket. |
accelerate | bool | (Optional) Whether to enable global Acceleration. |
acl | str | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
assume_role | CosBackendAssumeRole | (Optional) The assume_role block. |
domain | str | (Optional) The root domain of the API request. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) The Custom Endpoint for the COS backend. |
key | str | (Optional) The path for saving the state file in bucket. |
prefix | str | (Optional) The directory for saving the state file in bucket. |
region | str | (Optional) The region of the COS bucket. |
secret_id | str | (Optional) Secret id of Tencent Cloud. |
secret_key | str | (Optional) Secret key of Tencent Cloud. |
security_token | str | (Optional) TencentCloud Security Token of temporary access credentials. |
bucket
Required
- Type: str
(Required) The name of the COS bucket.
You shall manually create it first.
accelerate
Optional
- Type: bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assume_role
Optional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
- Type: str
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
key
Optional
- Type: str
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The directory for saving the state file in bucket.
Default to "env:".
region
Optional
- Type: str
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secret_id
Optional
- Type: str
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secret_key
Optional
- Type: str
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
security_token
Optional
- Type: str
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
DataConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
input | typing.Mapping[typing.Any] | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
triggers_replace | typing.Mapping[typing.Any] | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
input
Optional
- Type: typing.Mapping[typing.Any]
(Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#input
triggers_replace
Optional
- Type: typing.Mapping[typing.Any]
(Optional) A value which is stored in the instance state, and will force replacement when the value changes.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace
DataTerraformRemoteStateAzurermConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
container_name | str | (Required) The Name of the Storage Container within the Storage Account. |
key | str | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storage_account_name | str | (Required) The Name of the Storage Account. |
access_key | str | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
client_certificate_password | str | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
client_certificate_path | str | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
client_id | str | (Optional) The Client ID of the Service Principal. |
client_secret | str | (Optional) The Client Secret of the Service Principal. |
endpoint | str | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | str | (Optional) The Azure Environment which should be used. |
metadata_host | str | (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.). |
msi_endpoint | str | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidc_request_token | str | (Optional) The bearer token for the request to the OIDC provider. |
oidc_request_url | str | (Optional) The URL for the OIDC provider from which to request an ID token. |
oidc_token | str | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
oidc_token_file_path | str | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
resource_group_name | str | (Required) The Name of the Resource Group in which the Storage Account exists. |
sas_token | str | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | bool | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscription_id | str | (Optional) The Subscription ID in which the Storage Account exists. |
tenant_id | str | (Optional) The Tenant ID in which the Subscription exists. |
use_azuread_auth | bool | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
use_microsoft_graph | bool | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
use_msi | bool | (Optional) Should Managed Service Identity authentication be used? |
use_oidc | bool | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
container_name
Required
- Type: str
(Required) The Name of the Storage Container within the Storage Account.
key
Required
- Type: str
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storage_account_name
Required
- Type: str
(Required) The Name of the Storage Account.
access_key
Optional
- Type: str
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
client_certificate_password
Optional
- Type: str
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
client_certificate_path
Optional
- Type: str
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
client_id
Optional
- Type: str
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
client_secret
Optional
- Type: str
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
environment
Optional
- Type: str
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
metadata_host
Optional
- Type: str
(Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.).
msi_endpoint
Optional
- Type: str
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
oidc_request_token
Optional
- Type: str
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
oidc_request_url
Optional
- Type: str
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
oidc_token
Optional
- Type: str
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
oidc_token_file_path
Optional
- Type: str
(Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN_FILE_PATH environment variable.
resource_group_name
Optional
- Type: str
(Required) The Name of the Resource Group in which the Storage Account exists.
sas_token
Optional
- Type: str
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
snapshot
Optional
- Type: bool
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
subscription_id
Optional
- Type: str
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenant_id
Optional
- Type: str
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
use_azuread_auth
Optional
- Type: bool
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
use_microsoft_graph
Optional
- Type: bool
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
use_msi
Optional
- Type: bool
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
use_oidc
Optional
- Type: bool
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
DataTerraformRemoteStateConfig
Initializer
Properties
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
DataTerraformRemoteStateConsulConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
access_token | str | (Required) Access token. |
path | str | (Required) Path in the Consul KV store. |
address | str | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
ca_file | str | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
cert_file | str | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
datacenter | str | (Optional) The datacenter to use. |
gzip | bool | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
http_auth | str | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
key_file | str | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
lock | bool | (Optional) false to disable locking. |
scheme | str | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
access_token
Required
- Type: str
(Required) Access token.
path
Required
- Type: str
(Required) Path in the Consul KV store.
address
Optional
- Type: str
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
ca_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
cert_file
Optional
- Type: str
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenter
Optional
- Type: str
(Optional) The datacenter to use.
Defaults to that of the agent.
gzip
Optional
- Type: bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
http_auth
Optional
- Type: str
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
key_file
Optional
- Type: str
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lock
Optional
- Type: bool
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
scheme
Optional
- Type: str
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
DataTerraformRemoteStateCosConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | (Required) The name of the COS bucket. |
accelerate | bool | (Optional) Whether to enable global Acceleration. |
acl | str | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
assume_role | CosBackendAssumeRole | (Optional) The assume_role block. |
domain | str | (Optional) The root domain of the API request. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) The Custom Endpoint for the COS backend. |
key | str | (Optional) The path for saving the state file in bucket. |
prefix | str | (Optional) The directory for saving the state file in bucket. |
region | str | (Optional) The region of the COS bucket. |
secret_id | str | (Optional) Secret id of Tencent Cloud. |
secret_key | str | (Optional) Secret key of Tencent Cloud. |
security_token | str | (Optional) TencentCloud Security Token of temporary access credentials. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
(Required) The name of the COS bucket.
You shall manually create it first.
accelerate
Optional
- Type: bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assume_role
Optional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
- Type: str
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
key
Optional
- Type: str
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The directory for saving the state file in bucket.
Default to "env:".
region
Optional
- Type: str
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secret_id
Optional
- Type: str
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secret_key
Optional
- Type: str
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
security_token
Optional
- Type: str
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
DataTerraformRemoteStateGcsConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | (Required) The name of the GCS bucket. |
access_token | str | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
credentials | str | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryption_key | str | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonate_service_account | str | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonate_service_account_delegates | typing.List[str] | (Optional) The delegation chain for an impersonating a service account. |
kms_encryption_key | str | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
prefix | str | (Optional) GCS prefix inside the bucket. |
storeage_custom_endpoint | str | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
(Required) The name of the GCS bucket.
This name must be globally unique.
access_token
Optional
- Type: str
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
credentials
Optional
- Type: str
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
encryption_key
Optional
- Type: str
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonate_service_account
Optional
- Type: str
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
impersonate_service_account_delegates
Optional
- Type: typing.List[str]
(Optional) The delegation chain for an impersonating a service account.
kms_encryption_key
Optional
- Type: str
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
prefix
Optional
- Type: str
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeage_custom_endpoint
Optional
- Type: str
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
DataTerraformRemoteStateHttpConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
address | str | (Required) The address of the REST endpoint. |
client_ca_certificate_pem | str | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
client_certificate_pem | str | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
client_private_key_pem | str | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
lock_address | str | (Optional) The address of the lock REST endpoint. |
lock_method | str | (Optional) The HTTP method to use when locking. |
password | str | (Optional) The password for HTTP basic authentication. |
retry_max | typing.Union[int, float] | (Optional) The number of HTTP request retries. |
retry_wait_max | typing.Union[int, float] | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retry_wait_min | typing.Union[int, float] | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skip_cert_verification | bool | (Optional) Whether to skip TLS verification. |
unlock_address | str | (Optional) The address of the unlock REST endpoint. |
unlock_method | str | (Optional) The HTTP method to use when unlocking. |
update_method | str | (Optional) HTTP method to use when updating state. |
username | str | (Optional) The username for HTTP basic authentication. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
address
Required
- Type: str
(Required) The address of the REST endpoint.
client_ca_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
client_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
client_private_key_pem
Optional
- Type: str
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lock_address
Optional
- Type: str
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lock_method
Optional
- Type: str
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
- Type: str
(Optional) The password for HTTP basic authentication.
retry_max
Optional
- Type: typing.Union[int, float]
(Optional) The number of HTTP request retries.
Defaults to 2.
retry_wait_max
Optional
- Type: typing.Union[int, float]
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retry_wait_min
Optional
- Type: typing.Union[int, float]
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skip_cert_verification
Optional
- Type: bool
(Optional) Whether to skip TLS verification.
Defaults to false.
unlock_address
Optional
- Type: str
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlock_method
Optional
- Type: str
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
update_method
Optional
- Type: str
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
- Type: str
(Optional) The username for HTTP basic authentication.
DataTerraformRemoteStateLocalConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
path | str | Path where the state file is stored. |
workspace_dir | str | (Optional) The path to non-default workspaces. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
path
Optional
- Type: str
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspace_dir
Optional
- Type: str
(Optional) The path to non-default workspaces.
DataTerraformRemoteStateOssConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | (Required) The name of the OSS bucket. |
access_key | str | (Optional) Alibaba Cloud access key. |
acl | str | (Optional) Object ACL to be applied to the state file. |
assume_role | OssAssumeRole | No description. |
assume_role_policy | str | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
assume_role_role_arn | str | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
assume_role_session_expiration | typing.Union[int, float] | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
assume_role_session_name | str | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
ecs_role_name | str | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) A custom endpoint for the OSS API. |
key | str | (Optional) The name of the state file. |
prefix | str | (Optional) The path directory of the state file will be stored. |
profile | str | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
region | str | (Optional) The region of the OSS bucket. |
secret_key | str | (Optional) Alibaba Cloud secret access key. |
security_token | str | (Optional) STS access token. |
shared_credentials_file | str | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
sts_endpoint | str | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
tablestore_endpoint | str | (Optional) A custom endpoint for the TableStore API. |
tablestore_table | str | (Optional) A TableStore table for state locking and consistency. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
(Required) The name of the OSS bucket.
access_key
Optional
- Type: str
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file.
assume_role
Optional
assume_role
- Deprecated: Use flattened assume role options
- Type: OssAssumeRole
assume_role_policy
Optional
- Type: str
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
assume_role_role_arn
Optional
- Type: str
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
assume_role_session_expiration
Optional
- Type: typing.Union[int, float]
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
assume_role_session_name
Optional
- Type: str
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
ecs_role_name
Optional
- Type: str
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
- Type: str
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
region
Optional
- Type: str
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secret_key
Optional
- Type: str
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
security_token
Optional
- Type: str
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
shared_credentials_file
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
sts_endpoint
Optional
- Type: str
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
tablestore_endpoint
Optional
- Type: str
(Optional) A custom endpoint for the TableStore API.
tablestore_table
Optional
- Type: str
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type String.
DataTerraformRemoteStatePgConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
conn_str | str | Postgres connection string; |
schema_name | str | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
skip_index_creation | bool | If set to true, the Postgres index must already exist. |
skip_schema_creation | bool | If set to true, the Postgres schema must already exist. |
skip_table_creation | bool | If set to true, the Postgres table must already exist. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
conn_str
Required
- Type: str
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
schema_name
Optional
- Type: str
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
skip_index_creation
Optional
- Type: bool
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
skip_schema_creation
Optional
- Type: bool
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
skip_table_creation
Optional
- Type: bool
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
DataTerraformRemoteStateRemoteConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
organization | str | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | str | No description. |
token | str | No description. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
organization
Required
- Type: str
workspaces
Required
- Type: IRemoteWorkspace
hostname
Optional
- Type: str
token
Optional
- Type: str
DataTerraformRemoteStateS3Config
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
bucket | str | Name of the S3 Bucket. |
key | str | Path to the state file inside the S3 Bucket. |
access_key | str | (Optional) AWS access key. |
acl | str | (Optional) Canned ACL to be applied to the state file. |
allowed_account_ids | str | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
assume_role | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
assume_role_policy | str | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assume_role_policy_arns | typing.List[str] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assume_role_tags | typing.Mapping[str] | (Optional) Map of assume role session tags. |
assume_role_transitive_tag_keys | typing.List[str] | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
assume_role_with_web_identity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
custom_ca_bundle | str | (Optional) File containing custom root and intermediate certificates. |
dynamodb_endpoint | str | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodb_table | str | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
ec2_metadata_service_endpoint | str | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
ec2_metadata_service_endpoint_mode | str | (Optional) Mode to use in communicating with the metadata service. |
encrypt | bool | (Optional) Enable server side encryption of the state file. |
endpoint | str | (Optional) Custom endpoint for the AWS S3 API. |
endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
external_id | str | (Optional) External identifier to use when assuming the role. |
forbidden_account_ids | str | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
force_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
http_proxy | str | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
https_proxy | str | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
iam_endpoint | str | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
insecure | bool | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
kms_key_id | str | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
max_retries | typing.Union[int, float] | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
no_proxy | str | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
profile | str | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | str | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
retry_mode | str | (Optional) Specifies how retries are attempted. |
role_arn | str | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secret_key | str | (Optional) AWS secret access key. |
session_name | str | (Optional) Session name to use when assuming the role. |
shared_config_files | typing.List[str] | (Optional) List of paths to AWS shared configuration files. |
shared_credentials_file | str | (Optional) Path to the AWS shared credentials file. |
shared_credentials_files | typing.List[str] | (Optional) List of paths to AWS shared credentials files. |
skip_credentials_validation | bool | (Optional) Skip credentials validation via the STS API. |
skip_metadata_api_check | bool | (Optional) Skip usage of EC2 Metadata API. |
skip_region_validation | bool | (Optional) Skip validation of provided region name. |
skip_requesting_account_id | bool | (Optional) Whether to skip requesting the account ID. |
skip_s3_checksum | bool | (Optional) Do not include checksum when uploading S3 Objects. |
sse_customer_key | str | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
sts_endpoint | str | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
sts_region | str | (Optional) AWS region for STS. |
token | str | (Optional) Multi-Factor Authentication (MFA) token. |
use_legacy_workflow | bool | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
use_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
workspace_key_prefix | str | (Optional) Prefix applied to the state path inside the bucket. |
defaults
Optional
- Type: typing.Mapping[typing.Any]
workspace
Optional
- Type: str
bucket
Required
- Type: str
Name of the S3 Bucket.
key
Required
- Type: str
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
access_key
Optional
- Type: str
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
acl
Optional
- Type: str
(Optional) Canned ACL to be applied to the state file.
allowed_account_ids
Optional
- Type: str
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
assume_role
Optional
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
assume_role_policy
Optional
assume_role_policy
- Deprecated: Use assumeRole.policy instead.
- Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assume_role_policy_arns
Optional
assume_role_policy_arns
- Deprecated: Use assumeRole.policyArns instead.
- Type: typing.List[str]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assume_role_tags
Optional
assume_role_tags
- Deprecated: Use assumeRole.tags instead.
- Type: typing.Mapping[str]
(Optional) Map of assume role session tags.
assume_role_transitive_tag_keys
Optional
assume_role_transitive_tag_keys
- Deprecated: Use assumeRole.transitiveTagKeys instead.
- Type: typing.List[str]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
assume_role_with_web_identity
Optional
Assume Role With Web Identity Configuration.
custom_ca_bundle
Optional
- Type: str
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
dynamodb_endpoint
Optional
dynamodb_endpoint
- Deprecated: Use endpoints.dynamodb instead
- Type: str
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodb_table
Optional
- Type: str
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
ec2_metadata_service_endpoint
Optional
- Type: str
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
ec2_metadata_service_endpoint_mode
Optional
- Type: str
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
encrypt
Optional
- Type: bool
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
- Deprecated: Use endpoints.s3 instead
- Type: str
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
external_id
Optional
external_id
- Deprecated: Use assume_role.external_id instead.
- Type: str
(Optional) External identifier to use when assuming the role.
forbidden_account_ids
Optional
- Type: str
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
force_path_style
Optional
force_path_style
- Deprecated: Use usePathStyle instead
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
http_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
https_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
iam_endpoint
Optional
iam_endpoint
- Deprecated: Use endpoints.iam instead
- Type: str
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
insecure
Optional
- Type: bool
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kms_key_id
Optional
- Type: str
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
max_retries
Optional
- Type: typing.Union[int, float]
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
no_proxy
Optional
- Type: str
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
profile
Optional
- Type: str
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
region
Optional
- Type: str
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
retry_mode
Optional
- Type: str
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
role_arn
Optional
role_arn
- Deprecated: Use assumeRole.roleArn instead.
- Type: str
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secret_key
Optional
- Type: str
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
session_name
Optional
session_name
- Deprecated: Use assumeRole.sessionName instead.
- Type: str
(Optional) Session name to use when assuming the role.
shared_config_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
shared_credentials_file
Optional
- Type: str
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
shared_credentials_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skip_credentials_validation
Optional
- Type: bool
(Optional) Skip credentials validation via the STS API.
skip_metadata_api_check
Optional
- Type: bool
(Optional) Skip usage of EC2 Metadata API.
skip_region_validation
Optional
- Type: bool
(Optional) Skip validation of provided region name.
skip_requesting_account_id
Optional
- Type: bool
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
skip_s3_checksum
Optional
- Type: bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sse_customer_key
Optional
- Type: str
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
sts_endpoint
Optional
sts_endpoint
- Deprecated: Use endpoints.sts instead
- Type: str
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
sts_region
Optional
- Type: str
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
- Type: str
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
use_legacy_workflow
Optional
- Type: bool
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
use_path_style
Optional
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspace_key_prefix
Optional
- Type: str
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
DataTerraformRemoteStateSwiftConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
defaults | typing.Mapping[typing.Any] | No description. |
workspace | str | No description. |
container | str | No description. |
application_credential_id | str | No description. |
application_credential_name | str | No description. |
application_credential_secret | str | No description. |
archive_container | str | No description. |
auth_url | str | No description. |
cacert_file | str | No description. |
cert | str | No description. |
cloud | str | No description. |
default_domain | str | No description. |
domain_id | str | No description. |
domain_name | str | No description. |
expire_after | str | No description. |
insecure | bool | No description. |
key | str | No description. |
password | str | No description. |
project_domain_id | str | No description. |
project_domain_name | str | No description. |
region_name | str | No description. |
state_name | str | No description. |
tenant_id | str | No description. |
tenant_name | str | No description. |
token | str | No description. |
user_domain_id | str | No description. |
user_domain_name | str | No description. |
user_id | str | No description. |
user_name | str | No description. |
defaults
Optional
defaults
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
container
Required
container
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
application_credential_id
Optional
application_credential_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
application_credential_name
Optional
application_credential_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
application_credential_secret
Optional
application_credential_secret
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
archive_container
Optional
archive_container
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
auth_url
Optional
auth_url
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
cacert_file
Optional
cacert_file
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
cert
Optional
cert
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
cloud
Optional
cloud
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
default_domain
Optional
default_domain
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
domain_id
Optional
domain_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
domain_name
Optional
domain_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
expire_after
Optional
expire_after
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
insecure
Optional
insecure
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: bool
key
Optional
key
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
password
Optional
password
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
project_domain_id
Optional
project_domain_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
project_domain_name
Optional
project_domain_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
region_name
Optional
region_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
state_name
Optional
state_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
tenant_id
Optional
tenant_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
tenant_name
Optional
tenant_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
token
Optional
token
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_domain_id
Optional
user_domain_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_domain_name
Optional
user_domain_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_id
Optional
user_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_name
Optional
user_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
EncodingOptions
Properties to string encodings.
Initializer
Properties
Name | Type | Description |
---|---|---|
display_hint | str | A hint for the Token's purpose when stringifying it. |
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
FileProvisioner
The file provisioner copies files or directories from the machine running Terraform to the newly created resource.
The file provisioner supports both ssh and winrm type connections.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/file file}
Initializer
Properties
Name | Type | Description |
---|---|---|
destination | str | The source file or directory. |
type | str | No description. |
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. |
content | str | The destination path to write to on the remote system. |
source | str | The direct content to copy on the destination. |
destination
Required
- Type: str
The source file or directory.
Specify it either relative to the current working directory or as an absolute path. This argument cannot be combined with content.
type
Required
- Type: str
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
content
Optional
- Type: str
The destination path to write to on the remote system.
See Destination Paths below for more information.
source
Optional
- Type: str
The direct content to copy on the destination.
If destination is a file, the content will be written on that file. In case of a directory, a file named tf-file-content is created inside that directory. We recommend using a file as the destination when using content. This argument cannot be combined with source.
GcsBackendConfig
Stores the state as an object in a configurable prefix in a pre-existing bucket on Google Cloud Storage (GCS).
The bucket must exist prior to configuring the backend.
This backend supports state locking.
Warning! It is highly recommended that you enable Object Versioning on the GCS bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/gcs
Initializer
Properties
Name | Type | Description |
---|---|---|
bucket | str | (Required) The name of the GCS bucket. |
access_token | str | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
credentials | str | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryption_key | str | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonate_service_account | str | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonate_service_account_delegates | typing.List[str] | (Optional) The delegation chain for an impersonating a service account. |
kms_encryption_key | str | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
prefix | str | (Optional) GCS prefix inside the bucket. |
storeage_custom_endpoint | str | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
bucket
Required
- Type: str
(Required) The name of the GCS bucket.
This name must be globally unique.
access_token
Optional
- Type: str
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
credentials
Optional
- Type: str
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
encryption_key
Optional
- Type: str
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonate_service_account
Optional
- Type: str
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
impersonate_service_account_delegates
Optional
- Type: typing.List[str]
(Optional) The delegation chain for an impersonating a service account.
kms_encryption_key
Optional
- Type: str
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
prefix
Optional
- Type: str
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeage_custom_endpoint
Optional
- Type: str
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
HttpBackendConfig
Stores the state using a simple REST client.
State will be fetched via GET, updated via POST, and purged with DELETE. The method used for updating is configurable.
This backend optionally supports state locking. When locking support is enabled it will use LOCK and UNLOCK requests providing the lock info in the body. The endpoint should return a 423: Locked or 409: Conflict with the holding lock info when it's already taken, 200: OK for success. Any other status will be considered an error. The ID of the holding lock info will be added as a query parameter to state updates requests.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/http
Initializer
Properties
Name | Type | Description |
---|---|---|
address | str | (Required) The address of the REST endpoint. |
client_ca_certificate_pem | str | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
client_certificate_pem | str | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
client_private_key_pem | str | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
lock_address | str | (Optional) The address of the lock REST endpoint. |
lock_method | str | (Optional) The HTTP method to use when locking. |
password | str | (Optional) The password for HTTP basic authentication. |
retry_max | typing.Union[int, float] | (Optional) The number of HTTP request retries. |
retry_wait_max | typing.Union[int, float] | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retry_wait_min | typing.Union[int, float] | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skip_cert_verification | bool | (Optional) Whether to skip TLS verification. |
unlock_address | str | (Optional) The address of the unlock REST endpoint. |
unlock_method | str | (Optional) The HTTP method to use when unlocking. |
update_method | str | (Optional) HTTP method to use when updating state. |
username | str | (Optional) The username for HTTP basic authentication. |
address
Required
- Type: str
(Required) The address of the REST endpoint.
client_ca_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
client_certificate_pem
Optional
- Type: str
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
client_private_key_pem
Optional
- Type: str
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lock_address
Optional
- Type: str
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lock_method
Optional
- Type: str
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
- Type: str
(Optional) The password for HTTP basic authentication.
retry_max
Optional
- Type: typing.Union[int, float]
(Optional) The number of HTTP request retries.
Defaults to 2.
retry_wait_max
Optional
- Type: typing.Union[int, float]
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retry_wait_min
Optional
- Type: typing.Union[int, float]
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skip_cert_verification
Optional
- Type: bool
(Optional) Whether to skip TLS verification.
Defaults to false.
unlock_address
Optional
- Type: str
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlock_method
Optional
- Type: str
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
update_method
Optional
- Type: str
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
- Type: str
(Optional) The username for HTTP basic authentication.
LazyAnyValueOptions
Options for creating lazy untyped tokens.
Initializer
Properties
Name | Type | Description |
---|---|---|
display_hint | str | Use the given name as a display hint. |
omit_empty_array | bool | If the produced value is an array and it is empty, return 'undefined' instead. |
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty_array
Optional
- Type: bool
- Default: false
If the produced value is an array and it is empty, return 'undefined' instead.
LazyListValueOptions
Options for creating a lazy list token.
Initializer
Properties
Name | Type | Description |
---|---|---|
display_hint | str | Use the given name as a display hint. |
omit_empty | bool | If the produced list is empty, return 'undefined' instead. |
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty
Optional
- Type: bool
- Default: false
If the produced list is empty, return 'undefined' instead.
LazyStringValueOptions
Options for creating a lazy string token.
Initializer
Properties
Name | Type | Description |
---|---|---|
display_hint | str | Use the given name as a display hint. |
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
LocalBackendConfig
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/local
Initializer
Properties
Name | Type | Description |
---|---|---|
path | str | Path where the state file is stored. |
workspace_dir | str | (Optional) The path to non-default workspaces. |
path
Optional
- Type: str
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspace_dir
Optional
- Type: str
(Optional) The path to non-default workspaces.
LocalExecProvisioner
The local-exec provisioner invokes a local executable after a resource is created.
This invokes a process on the machine running Terraform, not on the resource.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/local-exec local-exec}
Initializer
Properties
Name | Type | Description |
---|---|---|
command | str | This is the command to execute. |
type | str | No description. |
environment | typing.Mapping[str] | A record of key value pairs representing the environment of the executed command. |
interpreter | typing.List[str] | If provided, this is a list of interpreter arguments used to execute the command. |
when | str | If provided, specifies when Terraform will execute the command. |
working_dir | str | If provided, specifies the working directory where command will be executed. |
command
Required
- Type: str
This is the command to execute.
It can be provided as a relative path to the current working directory or as an absolute path. It is evaluated in a shell, and can use environment variables or Terraform variables.
type
Required
- Type: str
environment
Optional
- Type: typing.Mapping[str]
A record of key value pairs representing the environment of the executed command.
It inherits the current process environment.
interpreter
Optional
- Type: typing.List[str]
If provided, this is a list of interpreter arguments used to execute the command.
The first argument is the interpreter itself. It can be provided as a relative path to the current working directory or as an absolute path The remaining arguments are appended prior to the command. This allows building command lines of the form "/bin/bash", "-c", "echo foo". If interpreter is unspecified, sensible defaults will be chosen based on the system OS.
when
Optional
- Type: str
If provided, specifies when Terraform will execute the command.
For example, when = destroy specifies that the provisioner will run when the associated resource is destroyed
working_dir
Optional
- Type: str
If provided, specifies the working directory where command will be executed.
It can be provided as a relative path to the current working directory or as an absolute path. The directory must exist.
OssAssumeRole
Initializer
Properties
Name | Type | Description |
---|---|---|
role_arn | str | No description. |
policy | str | No description. |
session_expiration | typing.Union[int, float] | No description. |
session_name | str | No description. |
role_arn
Required
- Type: str
policy
Optional
- Type: str
session_expiration
Optional
- Type: typing.Union[int, float]
session_name
Optional
- Type: str
OssBackendConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
bucket | str | (Required) The name of the OSS bucket. |
access_key | str | (Optional) Alibaba Cloud access key. |
acl | str | (Optional) Object ACL to be applied to the state file. |
assume_role | OssAssumeRole | No description. |
assume_role_policy | str | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
assume_role_role_arn | str | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
assume_role_session_expiration | typing.Union[int, float] | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
assume_role_session_name | str | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
ecs_role_name | str | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
encrypt | bool | (Optional) Whether to enable server side encryption of the state file. |
endpoint | str | (Optional) A custom endpoint for the OSS API. |
key | str | (Optional) The name of the state file. |
prefix | str | (Optional) The path directory of the state file will be stored. |
profile | str | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
region | str | (Optional) The region of the OSS bucket. |
secret_key | str | (Optional) Alibaba Cloud secret access key. |
security_token | str | (Optional) STS access token. |
shared_credentials_file | str | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
sts_endpoint | str | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
tablestore_endpoint | str | (Optional) A custom endpoint for the TableStore API. |
tablestore_table | str | (Optional) A TableStore table for state locking and consistency. |
bucket
Required
- Type: str
(Required) The name of the OSS bucket.
access_key
Optional
- Type: str
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
- Type: str
(Optional) Object ACL to be applied to the state file.
assume_role
Optional
assume_role
- Deprecated: Use flattened assume role options
- Type: OssAssumeRole
assume_role_policy
Optional
- Type: str
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
assume_role_role_arn
Optional
- Type: str
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
assume_role_session_expiration
Optional
- Type: typing.Union[int, float]
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
assume_role_session_name
Optional
- Type: str
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
ecs_role_name
Optional
- Type: str
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
encrypt
Optional
- Type: bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: str
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
- Type: str
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
- Type: str
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
region
Optional
- Type: str
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secret_key
Optional
- Type: str
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
security_token
Optional
- Type: str
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
shared_credentials_file
Optional
- Type: str
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
sts_endpoint
Optional
- Type: str
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
tablestore_endpoint
Optional
- Type: str
(Optional) A custom endpoint for the TableStore API.
tablestore_table
Optional
- Type: str
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type String.
PgBackendConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
conn_str | str | Postgres connection string; |
schema_name | str | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
skip_index_creation | bool | If set to true, the Postgres index must already exist. |
skip_schema_creation | bool | If set to true, the Postgres schema must already exist. |
skip_table_creation | bool | If set to true, the Postgres table must already exist. |
conn_str
Required
- Type: str
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
schema_name
Optional
- Type: str
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
skip_index_creation
Optional
- Type: bool
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
skip_schema_creation
Optional
- Type: bool
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
skip_table_creation
Optional
- Type: bool
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
Postcondition
Terraform checks a postcondition after evaluating the object it is associated with.
Initializer
Properties
Name | Type | Description |
---|---|---|
condition | typing.Any | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
error_message | str | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
condition
Required
- Type: typing.Any
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
error_message
Required
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
Precondition
Terraform checks a precondition before evaluating the object it is associated with.
Initializer
Properties
Name | Type | Description |
---|---|---|
condition | typing.Any | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
error_message | str | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
condition
Required
- Type: typing.Any
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
error_message
Required
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
RemoteBackendConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
organization | str | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | str | No description. |
token | str | No description. |
organization
Required
- Type: str
workspaces
Required
- Type: IRemoteWorkspace
hostname
Optional
- Type: str
token
Optional
- Type: str
RemoteExecProvisioner
The remote-exec provisioner invokes a script on a remote resource after it is created.
This can be used to run a configuration management tool, bootstrap into a cluster, etc The remote-exec provisioner requires a connection and supports both ssh and winrm.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec remote-exec}
Initializer
Properties
Name | Type | Description |
---|---|---|
type | str | No description. |
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. |
inline | typing.List[str] | This is a list of command strings. |
script | str | This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed. |
scripts | typing.List[str] | This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed. |
type
Required
- Type: str
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
A connection must be provided here or in the parent resource.
inline
Optional
- Type: typing.List[str]
This is a list of command strings.
They are executed in the order they are provided. This cannot be provided with script or scripts.
script
Optional
- Type: str
This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed.
This cannot be provided with inline or scripts.
scripts
Optional
- Type: typing.List[str]
This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed.
They are executed in the order they are provided. This cannot be provided with inline or script.
ResolveOptions
Options to the resolve() operation.
NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way.
Initializer
Properties
Name | Type | Description |
---|---|---|
resolver | ITokenResolver | The resolver to apply to any resolvable tokens found. |
scope | constructs.IConstruct | The scope from which resolution is performed. |
preparing | bool | Whether the resolution is being executed during the prepare phase or not. |
resolver
Required
- Type: ITokenResolver
The resolver to apply to any resolvable tokens found.
scope
Required
- Type: constructs.IConstruct
The scope from which resolution is performed.
preparing
Optional
- Type: bool
- Default: false
Whether the resolution is being executed during the prepare phase or not.
S3BackendAssumeRoleConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
role_arn | str | (Required) Amazon Resource Name (ARN) of the IAM Role to assume. |
duration | str | (Optional) The duration individual credentials will be valid. |
external_id | str | (Optional) External identifier to use when assuming the role. |
policy | str | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
policy_arns | typing.List[str] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
session_name | str | (Optional) Session name to use when assuming the role. |
source_identity | str | (Optional) Source identity specified by the principal assuming the. |
tags | typing.Mapping[str] | (Optional) Map of assume role session tags. |
transitive_tag_keys | typing.List[str] | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
role_arn
Required
- Type: str
(Required) Amazon Resource Name (ARN) of the IAM Role to assume.
duration
Optional
- Type: str
(Optional) The duration individual credentials will be valid.
Credentials are automatically renewed up to the maximum defined by the AWS account. Specified using the format < hours >h< minutes >m< seconds >s with any unit being optional. For example, an hour and a half can be specified as 1h30m or 90m. Must be between 15 minutes (15m) and 12 hours (12h).
external_id
Optional
- Type: str
(Optional) External identifier to use when assuming the role.
policy
Optional
- Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
policy_arns
Optional
- Type: typing.List[str]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
session_name
Optional
- Type: str
(Optional) Session name to use when assuming the role.
source_identity
Optional
- Type: str
(Optional) Source identity specified by the principal assuming the.
tags
Optional
- Type: typing.Mapping[str]
(Optional) Map of assume role session tags.
transitive_tag_keys
Optional
- Type: typing.List[str]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
S3BackendAssumeRoleWithWebIdentityConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
duration | str | (Optional) The duration individual credentials will be valid. |
policy | str | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
policy_arns | typing.List[str] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
role_arn | str | (Required) Amazon Resource Name (ARN) of the IAM Role to assume. |
session_name | str | (Optional) Session name to use when assuming the role. |
web_identity_token | str | (Optional) The value of a web identity token from an OpenID Connect (OIDC) or OAuth provider. |
web_identity_token_file | str | (Optional) File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider. |
duration
Optional
- Type: str
(Optional) The duration individual credentials will be valid.
Credentials are automatically renewed up to the maximum defined by the AWS account. Specified using the format < hours >h< minutes >m< seconds >s with any unit being optional. For example, an hour and a half can be specified as 1h30m or 90m. Must be between 15 minutes (15m) and 12 hours (12h).
policy
Optional
- Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
policy_arns
Optional
- Type: typing.List[str]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
role_arn
Optional
- Type: str
(Required) Amazon Resource Name (ARN) of the IAM Role to assume.
Can also be set with the AWS_ROLE_ARN environment variable.
session_name
Optional
- Type: str
(Optional) Session name to use when assuming the role.
Can also be set with the AWS_ROLE_SESSION_NAME environment variable.
web_identity_token
Optional
- Type: str
(Optional) The value of a web identity token from an OpenID Connect (OIDC) or OAuth provider.
One of web_identity_token or web_identity_token_file is required.
web_identity_token_file
Optional
- Type: str
(Optional) File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider.
One of web_identity_token_file or web_identity_token is required. Can also be set with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable.
S3BackendConfig
Stores the state as a given key in a given bucket on Amazon S3.
This backend also supports state locking and consistency checking via Dynamo DB, which can be enabled by setting the dynamodb_table field to an existing DynamoDB table name. A single DynamoDB table can be used to lock multiple remote state files. Terraform generates key names that include the values of the bucket and key variables.
Warning! It is highly recommended that you enable Bucket Versioning on the S3 bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/s3
Initializer
Properties
Name | Type | Description |
---|---|---|
bucket | str | Name of the S3 Bucket. |
key | str | Path to the state file inside the S3 Bucket. |
access_key | str | (Optional) AWS access key. |
acl | str | (Optional) Canned ACL to be applied to the state file. |
allowed_account_ids | str | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
assume_role | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
assume_role_policy | str | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assume_role_policy_arns | typing.List[str] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assume_role_tags | typing.Mapping[str] | (Optional) Map of assume role session tags. |
assume_role_transitive_tag_keys | typing.List[str] | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
assume_role_with_web_identity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
custom_ca_bundle | str | (Optional) File containing custom root and intermediate certificates. |
dynamodb_endpoint | str | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodb_table | str | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
ec2_metadata_service_endpoint | str | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
ec2_metadata_service_endpoint_mode | str | (Optional) Mode to use in communicating with the metadata service. |
encrypt | bool | (Optional) Enable server side encryption of the state file. |
endpoint | str | (Optional) Custom endpoint for the AWS S3 API. |
endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
external_id | str | (Optional) External identifier to use when assuming the role. |
forbidden_account_ids | str | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
force_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
http_proxy | str | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
https_proxy | str | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
iam_endpoint | str | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
insecure | bool | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
kms_key_id | str | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
max_retries | typing.Union[int, float] | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
no_proxy | str | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
profile | str | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | str | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
retry_mode | str | (Optional) Specifies how retries are attempted. |
role_arn | str | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secret_key | str | (Optional) AWS secret access key. |
session_name | str | (Optional) Session name to use when assuming the role. |
shared_config_files | typing.List[str] | (Optional) List of paths to AWS shared configuration files. |
shared_credentials_file | str | (Optional) Path to the AWS shared credentials file. |
shared_credentials_files | typing.List[str] | (Optional) List of paths to AWS shared credentials files. |
skip_credentials_validation | bool | (Optional) Skip credentials validation via the STS API. |
skip_metadata_api_check | bool | (Optional) Skip usage of EC2 Metadata API. |
skip_region_validation | bool | (Optional) Skip validation of provided region name. |
skip_requesting_account_id | bool | (Optional) Whether to skip requesting the account ID. |
skip_s3_checksum | bool | (Optional) Do not include checksum when uploading S3 Objects. |
sse_customer_key | str | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
sts_endpoint | str | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
sts_region | str | (Optional) AWS region for STS. |
token | str | (Optional) Multi-Factor Authentication (MFA) token. |
use_legacy_workflow | bool | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
use_path_style | bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
workspace_key_prefix | str | (Optional) Prefix applied to the state path inside the bucket. |
bucket
Required
- Type: str
Name of the S3 Bucket.
key
Required
- Type: str
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
access_key
Optional
- Type: str
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
acl
Optional
- Type: str
(Optional) Canned ACL to be applied to the state file.
allowed_account_ids
Optional
- Type: str
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
assume_role
Optional
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
assume_role_policy
Optional
assume_role_policy
- Deprecated: Use assumeRole.policy instead.
- Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assume_role_policy_arns
Optional
assume_role_policy_arns
- Deprecated: Use assumeRole.policyArns instead.
- Type: typing.List[str]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assume_role_tags
Optional
assume_role_tags
- Deprecated: Use assumeRole.tags instead.
- Type: typing.Mapping[str]
(Optional) Map of assume role session tags.
assume_role_transitive_tag_keys
Optional
assume_role_transitive_tag_keys
- Deprecated: Use assumeRole.transitiveTagKeys instead.
- Type: typing.List[str]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
assume_role_with_web_identity
Optional
Assume Role With Web Identity Configuration.
custom_ca_bundle
Optional
- Type: str
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
dynamodb_endpoint
Optional
dynamodb_endpoint
- Deprecated: Use endpoints.dynamodb instead
- Type: str
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodb_table
Optional
- Type: str
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
ec2_metadata_service_endpoint
Optional
- Type: str
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
ec2_metadata_service_endpoint_mode
Optional
- Type: str
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
encrypt
Optional
- Type: bool
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
- Deprecated: Use endpoints.s3 instead
- Type: str
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
external_id
Optional
external_id
- Deprecated: Use assume_role.external_id instead.
- Type: str
(Optional) External identifier to use when assuming the role.
forbidden_account_ids
Optional
- Type: str
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
force_path_style
Optional
force_path_style
- Deprecated: Use usePathStyle instead
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
http_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
https_proxy
Optional
- Type: str
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
iam_endpoint
Optional
iam_endpoint
- Deprecated: Use endpoints.iam instead
- Type: str
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
insecure
Optional
- Type: bool
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kms_key_id
Optional
- Type: str
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
max_retries
Optional
- Type: typing.Union[int, float]
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
no_proxy
Optional
- Type: str
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
profile
Optional
- Type: str
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
region
Optional
- Type: str
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
retry_mode
Optional
- Type: str
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
role_arn
Optional
role_arn
- Deprecated: Use assumeRole.roleArn instead.
- Type: str
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secret_key
Optional
- Type: str
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
session_name
Optional
session_name
- Deprecated: Use assumeRole.sessionName instead.
- Type: str
(Optional) Session name to use when assuming the role.
shared_config_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
shared_credentials_file
Optional
- Type: str
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
shared_credentials_files
Optional
- Type: typing.List[str]
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skip_credentials_validation
Optional
- Type: bool
(Optional) Skip credentials validation via the STS API.
skip_metadata_api_check
Optional
- Type: bool
(Optional) Skip usage of EC2 Metadata API.
skip_region_validation
Optional
- Type: bool
(Optional) Skip validation of provided region name.
skip_requesting_account_id
Optional
- Type: bool
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
skip_s3_checksum
Optional
- Type: bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sse_customer_key
Optional
- Type: str
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
sts_endpoint
Optional
sts_endpoint
- Deprecated: Use endpoints.sts instead
- Type: str
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
sts_region
Optional
- Type: str
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
- Type: str
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
use_legacy_workflow
Optional
- Type: bool
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
use_path_style
Optional
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspace_key_prefix
Optional
- Type: str
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
S3BackendEndpointConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
dynamodb | str | (Optional) Custom endpoint URL for the AWS DynamoDB API. |
iam | str | (Optional) Custom endpoint URL for the AWS IAM API. |
s3 | str | (Optional) Custom endpoint URL for the AWS S3 API. |
sso | str | (Optional) Custom endpoint URL for the AWS IAM Identity Center (formerly known as AWS SSO) API. |
sts | str | (Optional) Custom endpoint URL for the AWS STS API. |
dynamodb
Optional
- Type: str
(Optional) Custom endpoint URL for the AWS DynamoDB API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_DYNAMODB or the deprecated environment variable AWS_DYNAMODB_ENDPOINT.
iam
Optional
- Type: str
(Optional) Custom endpoint URL for the AWS IAM API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_IAM or the deprecated environment variable AWS_IAM_ENDPOINT.
s3
Optional
- Type: str
(Optional) Custom endpoint URL for the AWS S3 API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_S3 or the deprecated environment variable AWS_S3_ENDPOINT.
sso
Optional
- Type: str
(Optional) Custom endpoint URL for the AWS IAM Identity Center (formerly known as AWS SSO) API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_SSO.
sts
Optional
- Type: str
(Optional) Custom endpoint URL for the AWS STS API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_STS or the deprecated environment variable AWS_STS_ENDPOINT.
SSHProvisionerConnection
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
Refer to {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection connection}
Initializer
Properties
Name | Type | Description |
---|---|---|
host | str | The address of the resource to connect to. |
type | str | The connection type. |
agent | str | Set to false to disable using ssh-agent to authenticate. |
agent_identity | str | The preferred identity from the ssh agent for authentication. |
bastion_certificate | str | The contents of a signed CA Certificate. |
bastion_host | str | Setting this enables the bastion Host connection. |
bastion_host_key | str | The public key from the remote host or the signing CA, used to verify the host connection. |
bastion_password | str | The password to use for the bastion host. |
bastion_port | typing.Union[int, float] | The port to use connect to the bastion host. |
bastion_private_key | str | The contents of an SSH key file to use for the bastion host. |
bastion_user | str | The user for the connection to the bastion host. |
certificate | str | The contents of a signed CA Certificate. |
host_key | str | The public key from the remote host or the signing CA, used to verify the connection. |
password | str | The password to use for the connection. |
port | typing.Union[int, float] | The port to connect to. |
private_key | str | The contents of an SSH key to use for the connection. |
proxy_host | str | Setting this enables the SSH over HTTP connection. |
proxy_port | typing.Union[int, float] | The port to use connect to the proxy host. |
proxy_scheme | str | The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy. |
proxy_user_name | str | The username to use connect to the private proxy host. |
proxy_user_password | str | The password to use connect to the private proxy host. |
script_path | str | The path used to copy scripts meant for remote execution. |
target_platform | str | The target platform to connect to. |
timeout | str | The timeout to wait for the connection to become available. |
user | str | The user to use for the connection. |
host
Required
- Type: str
The address of the resource to connect to.
type
Required
- Type: str
The connection type.
Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.
agent
Optional
- Type: str
Set to false to disable using ssh-agent to authenticate.
On Windows the only supported SSH authentication agent is Pageant.
agent_identity
Optional
- Type: str
The preferred identity from the ssh agent for authentication.
bastion_certificate
Optional
- Type: str
The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a bastion_private_key. These can be loaded from a file on disk using the the file function.
bastion_host
Optional
- Type: str
Setting this enables the bastion Host connection.
The provisioner will connect to bastion_host first, and then connect from there to host.
bastion_host_key
Optional
- Type: str
The public key from the remote host or the signing CA, used to verify the host connection.
bastion_password
Optional
- Type: str
The password to use for the bastion host.
bastion_port
Optional
- Type: typing.Union[int, float]
The port to use connect to the bastion host.
bastion_private_key
Optional
- Type: str
The contents of an SSH key file to use for the bastion host.
These can be loaded from a file on disk using the file function.
bastion_user
Optional
- Type: str
The user for the connection to the bastion host.
certificate
Optional
- Type: str
The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a private_key. These can be loaded from a file on disk using the the file function.
host_key
Optional
- Type: str
The public key from the remote host or the signing CA, used to verify the connection.
password
Optional
- Type: str
The password to use for the connection.
port
Optional
- Type: typing.Union[int, float]
- Default: 22
The port to connect to.
private_key
Optional
- Type: str
The contents of an SSH key to use for the connection.
These can be loaded from a file on disk using the file function. This takes preference over password if provided.
proxy_host
Optional
- Type: str
Setting this enables the SSH over HTTP connection.
This host will be connected to first, and then the host or bastion_host connection will be made from there.
proxy_port
Optional
- Type: typing.Union[int, float]
The port to use connect to the proxy host.
proxy_scheme
Optional
- Type: str
The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy.
proxy_user_name
Optional
- Type: str
The username to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.
proxy_user_password
Optional
- Type: str
The password to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.
script_path
Optional
- Type: str
The path used to copy scripts meant for remote execution.
Refer to {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts How Provisioners Execute Remote Scripts below for more details}
target_platform
Optional
- Type: str
- Default: unix
The target platform to connect to.
Valid values are "windows" and "unix". If the platform is set to windows, the default scriptpath is c:\windows\temp\terraform%RAND%.cmd, assuming the SSH default shell is cmd.exe. If the SSH default shell is PowerShell, set scriptpath to "c:/windows/temp/terraform%RAND%.ps1"
timeout
Optional
- Type: str
- Default: 5m
The timeout to wait for the connection to become available.
Should be provided as a string (e.g., "30s" or "5m".)
user
Optional
- Type: str
- Default: root
The user to use for the connection.
StackAnnotation
Initializer
Properties
Name | Type | Description |
---|---|---|
construct_path | str | No description. |
level | AnnotationMetadataEntryType | No description. |
message | str | No description. |
stacktrace | typing.List[str] | No description. |
construct_path
Required
- Type: str
level
Required
message
Required
- Type: str
stacktrace
Optional
- Type: typing.List[str]
StackManifest
Initializer
Properties
Name | Type | Description |
---|---|---|
annotations | typing.List[StackAnnotation] | No description. |
construct_path | str | No description. |
dependencies | typing.List[str] | No description. |
name | str | No description. |
stack_metadata_path | str | No description. |
synthesized_stack_path | str | No description. |
working_directory | str | No description. |
annotations
Required
- Type: typing.List[StackAnnotation]
construct_path
Required
- Type: str
dependencies
Required
- Type: typing.List[str]
name
Required
- Type: str
stack_metadata_path
Required
- Type: str
synthesized_stack_path
Required
- Type: str
working_directory
Required
- Type: str
SwiftBackendConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
container | str | No description. |
application_credential_id | str | No description. |
application_credential_name | str | No description. |
application_credential_secret | str | No description. |
archive_container | str | No description. |
auth_url | str | No description. |
cacert_file | str | No description. |
cert | str | No description. |
cloud | str | No description. |
default_domain | str | No description. |
domain_id | str | No description. |
domain_name | str | No description. |
expire_after | str | No description. |
insecure | bool | No description. |
key | str | No description. |
password | str | No description. |
project_domain_id | str | No description. |
project_domain_name | str | No description. |
region_name | str | No description. |
state_name | str | No description. |
tenant_id | str | No description. |
tenant_name | str | No description. |
token | str | No description. |
user_domain_id | str | No description. |
user_domain_name | str | No description. |
user_id | str | No description. |
user_name | str | No description. |
container
Required
container
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
application_credential_id
Optional
application_credential_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
application_credential_name
Optional
application_credential_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
application_credential_secret
Optional
application_credential_secret
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
archive_container
Optional
archive_container
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
auth_url
Optional
auth_url
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
cacert_file
Optional
cacert_file
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
cert
Optional
cert
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
cloud
Optional
cloud
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
default_domain
Optional
default_domain
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
domain_id
Optional
domain_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
domain_name
Optional
domain_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
expire_after
Optional
expire_after
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
insecure
Optional
insecure
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: bool
key
Optional
key
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
password
Optional
password
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
project_domain_id
Optional
project_domain_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
project_domain_name
Optional
project_domain_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
region_name
Optional
region_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
state_name
Optional
state_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
tenant_id
Optional
tenant_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
tenant_name
Optional
tenant_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
token
Optional
token
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_domain_id
Optional
user_domain_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_domain_name
Optional
user_domain_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_id
Optional
user_id
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
user_name
Optional
user_name
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
- Type: str
TerraformAssetConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
path | str | No description. |
asset_hash | str | No description. |
type | AssetType | No description. |
path
Required
- Type: str
asset_hash
Optional
- Type: str
type
Optional
- Type: AssetType
TerraformCondition
Initializer
Properties
Name | Type | Description |
---|---|---|
condition | typing.Any | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
error_message | str | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
condition
Required
- Type: typing.Any
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
error_message
Required
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
TerraformConstructor
Initializer
Properties
Name | Type | Description |
---|---|---|
tf_resource_type | str | No description. |
tf_resource_type
Required
- Type: str
TerraformElementMetadata
Initializer
Properties
Name | Type | Description |
---|---|---|
path | str | No description. |
stack_trace | typing.List[str] | No description. |
unique_id | str | No description. |
path
Required
- Type: str
stack_trace
Required
- Type: typing.List[str]
unique_id
Required
- Type: str
TerraformHclModuleConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | No description. |
skip_asset_creation_from_local_modules | bool | No description. |
source | str | No description. |
version | str | No description. |
variables | typing.Mapping[typing.Any] | No description. |
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
providers
Optional
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
- Type: bool
source
Required
- Type: str
version
Optional
- Type: str
variables
Optional
- Type: typing.Mapping[typing.Any]
TerraformMetaArguments
Initializer
Properties
Name | Type | Description |
---|---|---|
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
TerraformModuleConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | No description. |
skip_asset_creation_from_local_modules | bool | No description. |
source | str | No description. |
version | str | No description. |
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
providers
Optional
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
- Type: bool
source
Required
- Type: str
version
Optional
- Type: str
TerraformModuleProvider
Initializer
Properties
Name | Type | Description |
---|---|---|
module_alias | str | No description. |
provider | TerraformProvider | No description. |
module_alias
Required
- Type: str
provider
Required
- Type: TerraformProvider
TerraformModuleUserConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | No description. |
skip_asset_creation_from_local_modules | bool | No description. |
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
providers
Optional
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
- Type: bool
TerraformOutputConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
value | typing.Any | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
description | str | No description. |
precondition | Precondition | No description. |
sensitive | bool | No description. |
static_id | bool | If set to true the synthesized Terraform Output will be named after the id passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId). |
value
Required
- Type: typing.Any
depends_on
Optional
- Type: typing.List[ITerraformDependable]
description
Optional
- Type: str
precondition
Optional
- Type: Precondition
sensitive
Optional
- Type: bool
static_id
Optional
- Type: bool
- Default: false
If set to true the synthesized Terraform Output will be named after the id
passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId).
TerraformProviderConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
terraform_provider_source | str | No description. |
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
terraform_provider_source
Optional
- Type: str
TerraformProviderGeneratorMetadata
Initializer
Properties
Name | Type | Description |
---|---|---|
provider_name | str | No description. |
provider_version | str | No description. |
provider_version_constraint | str | No description. |
provider_name
Required
- Type: str
provider_version
Optional
- Type: str
provider_version_constraint
Optional
- Type: str
TerraformResourceConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
connection | typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[ITerraformDependable] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] | No description. |
terraform_resource_type | str | No description. |
terraform_generator_metadata | TerraformProviderGeneratorMetadata | No description. |
connection
Optional
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[ITerraformDependable]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
terraform_resource_type
Required
- Type: str
terraform_generator_metadata
Optional
TerraformResourceImport
Initializer
Properties
Name | Type | Description |
---|---|---|
id | str | No description. |
provider | TerraformProvider | No description. |
id
Required
- Type: str
provider
Optional
- Type: TerraformProvider
TerraformResourceLifecycle
Initializer
Properties
Name | Type | Description |
---|---|---|
create_before_destroy | bool | No description. |
ignore_changes | typing.Union[typing.List[str], str] | No description. |
postcondition | typing.List[Postcondition] | No description. |
precondition | typing.List[Precondition] | No description. |
prevent_destroy | bool | No description. |
replace_triggered_by | typing.List[typing.Union[str, ITerraformDependable]] | No description. |
create_before_destroy
Optional
- Type: bool
ignore_changes
Optional
- Type: typing.Union[typing.List[str], str]
postcondition
Optional
- Type: typing.List[Postcondition]
precondition
Optional
- Type: typing.List[Precondition]
prevent_destroy
Optional
- Type: bool
replace_triggered_by
Optional
- Type: typing.List[typing.Union[str, ITerraformDependable]]
TerraformResourceMoveById
Initializer
Properties
from
Required
- Type: str
to
Required
- Type: str
TerraformResourceMoveByTarget
Initializer
Properties
Name | Type | Description |
---|---|---|
move_target | str | No description. |
index | typing.Union[str, typing.Union[int, float]] | No description. |
move_target
Required
- Type: str
index
Optional
- Type: typing.Union[str, typing.Union[int, float]]
TerraformStackMetadata
Initializer
Properties
Name | Type | Description |
---|---|---|
backend | str | No description. |
stack_name | str | No description. |
version | str | No description. |
cloud | str | No description. |
backend
Required
- Type: str
stack_name
Required
- Type: str
version
Required
- Type: str
cloud
Optional
- Type: str
TerraformVariableConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
default | typing.Any | No description. |
description | str | No description. |
nullable | bool | No description. |
sensitive | bool | No description. |
type | str | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. |
validation | typing.List[TerraformVariableValidationConfig] | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. |
default
Optional
- Type: typing.Any
description
Optional
- Type: str
nullable
Optional
- Type: bool
sensitive
Optional
- Type: bool
type
Optional
- Type: str
The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable.
If no type constraint is set then a value of any type is accepted.
While type constraints are optional, we recommend specifying them; they serve as easy reminders for users of the module, and allow Terraform to return a helpful error message if the wrong type is used.
Type constraints are created from a mixture of type keywords and type constructors. The supported type keywords are:
- string
- number
- bool
The type constructors allow you to specify complex types such as collections:
- list(< TYPE >)
- set(< TYPE >)
- map(< TYPE >)
- object({< ATTR NAME > = < TYPE >, ... })
- tuple([< TYPE >, ...])
The keyword any may be used to indicate that any type is acceptable. For more information on the meaning and behavior of these different types, as well as detailed information about automatic conversion of complex types, refer to {@link https://developer.hashicorp.com/terraform/language/expressions/type-constraints Type Constraints}.
If both the type and default arguments are specified, the given default value must be convertible to the specified type.
validation
Optional
- Type: typing.List[TerraformVariableValidationConfig]
Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.
TerraformVariableValidationConfig
Add one or more validation blocks within the variable block to specify custom conditions.
Initializer
Properties
Name | Type | Description |
---|---|---|
condition | typing.Any | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
error_message | str | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
condition
Required
- Type: typing.Any
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
error_message
Required
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
TestingAppConfig
Initializer
Properties
Name | Type | Description |
---|---|---|
context | typing.Mapping[typing.Any] | No description. |
enable_future_flags | bool | No description. |
fake_cdktf_json_path | bool | No description. |
outdir | str | No description. |
stack_traces | bool | No description. |
stub_version | bool | No description. |
context
Optional
- Type: typing.Mapping[typing.Any]
enable_future_flags
Optional
- Type: bool
fake_cdktf_json_path
Optional
- Type: bool
outdir
Optional
- Type: str
stack_traces
Optional
- Type: bool
stub_version
Optional
- Type: bool
WinrmProvisionerConnection
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection connection}
Initializer
Properties
Name | Type | Description |
---|---|---|
host | str | The address of the resource to connect to. |
type | str | The connection type. |
cacert | str | The CA certificate to validate against. |
https | bool | Set to true to connect using HTTPS instead of HTTP. |
insecure | bool | Set to true to skip validating the HTTPS certificate chain. |
password | str | The password to use for the connection. |
port | typing.Union[int, float] | The port to connect to. |
script_path | str | The path used to copy scripts meant for remote execution. |
timeout | str | The timeout to wait for the connection to become available. |
use_ntlm | bool | Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest. |
user | str | The user to use for the connection. |
host
Required
- Type: str
The address of the resource to connect to.
type
Required
- Type: str
The connection type.
Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.
cacert
Optional
- Type: str
The CA certificate to validate against.
https
Optional
- Type: bool
Set to true to connect using HTTPS instead of HTTP.
insecure
Optional
- Type: bool
Set to true to skip validating the HTTPS certificate chain.
password
Optional
- Type: str
The password to use for the connection.
port
Optional
- Type: typing.Union[int, float]
- Default: 22
The port to connect to.
script_path
Optional
- Type: str
The path used to copy scripts meant for remote execution.
Refer to {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts How Provisioners Execute Remote Scripts below for more details}
timeout
Optional
- Type: str
- Default: 5m
The timeout to wait for the connection to become available.
Should be provided as a string (e.g., "30s" or "5m".)
use_ntlm
Optional
- Type: bool
Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest.
Refer to Authentication for Remote Connections in the Windows App Development documentation for more details.
user
Optional
- Type: str
- Default: root
The user to use for the connection.
Classes
Annotations
Includes API for attaching annotations such as warning messages to constructs.
Methods
Name | Description |
---|---|
add_error | Adds an { "error": < message > } metadata entry to this construct. |
add_info | Adds an info metadata entry to this construct. |
add_warning | Adds a warning metadata entry to this construct. |
add_error
Adds an { "error": < message > } metadata entry to this construct.
The toolkit will fail synthesis when errors are reported.
message
Required
- Type: str
The error message.
add_info
Adds an info metadata entry to this construct.
The CLI will display the info message when apps are synthesized.
message
Required
- Type: str
The info message.
add_warning
Adds a warning metadata entry to this construct.
The CLI will display the warning when an app is synthesized. In a future release the CLI might introduce a --strict flag which will then fail the synthesis if it encounters a warning.
message
Required
- Type: str
The warning message.
Static Functions
Name | Description |
---|---|
of | Returns the annotations API for a construct scope. |
of
Returns the annotations API for a construct scope.
scope
Required
- Type: constructs.IConstruct
The scope.
AnyListList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
AnyListMap
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
AnyMap
- Implements: ITerraformAddressable, IResolvable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
lookup
key
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
AnyMapList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
Aspects
Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.
Methods
Name | Description |
---|---|
add | Adds an aspect to apply this scope before synthesis. |
add
Adds an aspect to apply this scope before synthesis.
aspect
Required
- Type: IAspect
The aspect to add.
Static Functions
Name | Description |
---|---|
of | Returns the Aspects object associated with a construct scope. |
of
Returns the Aspects
object associated with a construct scope.
scope
Required
- Type: constructs.IConstruct
The scope for which these aspects will apply.
Properties
Name | Type | Description |
---|---|---|
all | typing.List[IAspect] | The list of aspects which were directly applied on this scope. |
all
Required
- Type: typing.List[IAspect]
The list of aspects which were directly applied on this scope.
AssertionReturn
Class representing the contents of a return by an assertion.
Initializers
Name | Type | Description |
---|---|---|
message | str | - String message containing information about the result of the assertion. |
pass | bool | - Boolean pass denoting the success of the assertion. |
message
Required
- Type: str
String message containing information about the result of the assertion.
pass
Required
- Type: bool
Boolean pass denoting the success of the assertion.
Properties
Name | Type | Description |
---|---|---|
message | str | - String message containing information about the result of the assertion. |
pass | bool | - Boolean pass denoting the success of the assertion. |
message
Required
- Type: str
String message containing information about the result of the assertion.
pass
Required
- Type: bool
Boolean pass denoting the success of the assertion.
BooleanList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
BooleanListList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
BooleanListMap
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
BooleanMap
- Implements: ITerraformAddressable, IResolvable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
lookup
key
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
BooleanMapList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
CloudWorkspace
A cloud workspace can either be a single named workspace, or a list of tagged workspaces.
Initializers
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_terraform
ComplexComputedList
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
complex_computed_list_index | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
complex_computed_list_index
Required
- Type: str
wraps_set
Optional
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
get_any_map_attribute | No description. |
get_boolean_attribute | No description. |
get_boolean_map_attribute | No description. |
get_list_attribute | No description. |
get_number_attribute | No description. |
get_number_list_attribute | No description. |
get_number_map_attribute | No description. |
get_string_attribute | No description. |
get_string_map_attribute | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
compute_fqn
get_any_map_attribute
get_any_map_attribute
terraform_attribute
Required
- Type: str
get_boolean_attribute
get_boolean_attribute
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
get_boolean_map_attribute
terraform_attribute
Required
- Type: str
get_list_attribute
get_list_attribute
terraform_attribute
Required
- Type: str
get_number_attribute
get_number_attribute
terraform_attribute
Required
- Type: str
get_number_list_attribute
get_number_list_attribute
terraform_attribute
Required
- Type: str
get_number_map_attribute
get_number_map_attribute
terraform_attribute
Required
- Type: str
get_string_attribute
get_string_attribute
terraform_attribute
Required
- Type: str
get_string_map_attribute
get_string_map_attribute
terraform_attribute
Required
- Type: str
interpolation_for_attribute
interpolation_for_attribute
property
Required
- Type: str
resolve
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack
- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
fqn
- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
- Type: str
ComplexList
- Implements: ITerraformAddressable, IResolvable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
all_with_map_key
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
ComplexMap
- Implements: ITerraformAddressable, IResolvable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
ComplexObject
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
complex_object_is_from_set | bool | set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items. |
complex_object_index | typing.Union[str, typing.Union[int, float]] | the index of the complex object in a list. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
complex_object_is_from_set
Required
- Type: bool
set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items.
complex_object_index
Optional
- Type: typing.Union[str, typing.Union[int, float]]
the index of the complex object in a list.
Methods
Name | Description |
---|---|
compute_fqn | No description. |
get_any_map_attribute | No description. |
get_boolean_attribute | No description. |
get_boolean_map_attribute | No description. |
get_list_attribute | No description. |
get_number_attribute | No description. |
get_number_list_attribute | No description. |
get_number_map_attribute | No description. |
get_string_attribute | No description. |
get_string_map_attribute | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
get_any_map_attribute
terraform_attribute
Required
- Type: str
get_boolean_attribute
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
terraform_attribute
Required
- Type: str
get_list_attribute
terraform_attribute
Required
- Type: str
get_number_attribute
terraform_attribute
Required
- Type: str
get_number_list_attribute
terraform_attribute
Required
- Type: str
get_number_map_attribute
terraform_attribute
Required
- Type: str
get_string_attribute
terraform_attribute
Required
- Type: str
get_string_map_attribute
terraform_attribute
Required
- Type: str
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
DefaultTokenResolver
- Implements: ITokenResolver
Default resolver implementation.
Initializers
Name | Type | Description |
---|---|---|
concat | IFragmentConcatenator | No description. |
concat
Required
- Type: IFragmentConcatenator
Methods
Name | Description |
---|---|
resolve_list | Resolves a list of string. |
resolve_map | Resolves a map token. |
resolve_number_list | Resolves a list of numbers. |
resolve_string | Resolve string fragments to Tokens. |
resolve_token | Default Token resolution. |
resolve_list
Resolves a list of string.
xs
Required
- Type: typing.List[str]
context
Required
- Type: IResolveContext
resolve_map
Resolves a map token.
xs
Required
- Type: typing.Mapping[typing.Any]
context
Required
- Type: IResolveContext
resolve_number_list
Resolves a list of numbers.
xs
Required
- Type: typing.List[typing.Union[int, float]]
context
Required
- Type: IResolveContext
resolve_string
Resolve string fragments to Tokens.
fragments
Required
- Type: TokenizedStringFragments
context
Required
- Type: IResolveContext
resolve_token
Default Token resolution.
Resolve the Token, recurse into whatever it returns, then finally post-process it.
t
Required
- Type: IResolvable
context
Required
- Type: IResolveContext
post_processor
Required
- Type: IPostProcessor
DynamicListTerraformIterator
Initializers
Name | Type | Description |
---|---|---|
list | typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]] | No description. |
map_key_attribute_name | str | No description. |
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
map_key_attribute_name
Required
- Type: str
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ]
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
attribute
Required
- Type: str
name of the property to retrieve.
get_list
attribute
Required
- Type: str
name of the property to retrieve.
get_map
attribute
Required
- Type: str
name of the property to retrieve.
get_number
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
attribute
Required
- Type: str
name of the property to retrieve.
get_string
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
attribute
Required
- Type: str
name of the property to retrieve.
keys
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluck_property
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
property
Required
- Type: str
The property of the iterators values to map to.
values
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
from_data_sources
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | str | Returns the key of the current entry in the map that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
- Type: str
Returns the key of the current entry in the map that is being iterated over.
value
Required
- Type: typing.Any
Returns the value of the current item iterated over.
Fn
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
abs | {@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it. |
abspath | {@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory. |
alltrue | {@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true" . It also returns true if the collection is empty. |
anytrue | {@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true" . It also returns false if the collection is empty. |
base64decode | {@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string. |
base64encode | {@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string. |
base64gzip | {@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding. |
base64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation. |
base64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation. |
basename | {@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it. |
can | {@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
ceil | {@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
chomp | {@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string. |
chunklist | {@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists. |
cidrhost | {@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix. |
cidrnetmask | {@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
cidrsubnet | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix. |
cidrsubnets | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
coalesce | {@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string. |
coalescelist | {@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty. |
compact | {@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed. |
concat | {@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list. |
contains | {@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements. |
csvdecode | {@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
dirname | {@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it. |
distinct | {@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed. |
element | {@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list. |
endswith | {@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. |
file | {@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string. |
filebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string. |
filebase64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string. |
filebase64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string. |
fileexists | {@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path. |
filemd5 | {@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string. |
fileset | {@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/ ) as the path separator for cross-system compatibility. |
filesha1 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string. |
filesha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string. |
filesha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string. |
flatten | {@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
floor | {@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
format | The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages. |
formatdate | {@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format. |
formatlist | {@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string. |
indent | {@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
index | {@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list. |
jsondecode | {@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string. |
jsonencode | {@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax. |
keys | {@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map. |
length_of | {@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string. |
log | {@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base. |
lower | {@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase. |
matchkeys | {@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
max | {@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set. |
md5 | {@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
merge | {@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
min | {@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set. |
nonsensitive | {@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
one | {@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null . Otherwise, one returns the first element. If there are two or more elements then one will return an error. |
parseint | {@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive. |
pathexpand | {@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path. |
plantimestamp | {@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan. |
pow | {@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument. |
regex | {@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings. |
regexall | {@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches. |
replace | {@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
reverse | {@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
rsadecrypt | {@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
sensitive | {@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables. |
setintersection | The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets. |
setproduct | The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product. |
setsubtract | The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set. |
setunion | The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets. |
sha1 | {@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
signum | {@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
slice | {@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list. |
sort | {@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically. |
split | {@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator. |
startswith | {@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. |
strcontains | {@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it. |
strrev | {@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected). |
substr | {@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length. |
sum | {@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers. |
templatefile | {@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables. |
textdecodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
textencodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
timeadd | {@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp. |
timecmp | {@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. |
timestamp | {@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format. |
title | {@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase. |
tobool | {@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value. |
tolist | {@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value. |
tomap | {@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value. |
tonumber | {@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value. |
toset | {@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value. |
tostring | {@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value. |
transpose | {@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
trim | {@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string. |
trimprefix | {@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged. |
trimspace | {@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string. |
trimsuffix | {@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string. |
try | {@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
upper | {@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase. |
urlencode | {@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string. |
uuid | {@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string. |
uuidv5 | {@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID. |
values | {@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map. |
yamldecode | {@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value. |
yamlencode | {@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax. |
zipmap | {@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values. |
bcrypt | {@link /terraform/docs/language/functions/bcrypt.html bcrypt} computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems. |
conditional | {@link https://developer.hashicorp.com/terraform/language/expressions/conditionals} A conditional expression uses the value of a boolean expression to select one of two values. |
join | {@link /terraform/docs/language/functions/join.html join} produces a string by concatenating together all elements of a given list of strings with the given delimiter. |
lookup | {@link /terraform/docs/language/functions/lookup.html lookup} retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead. |
lookup_nested | returns a property access expression that accesses the property at the given path in the given inputMap. |
range | {@link /terraform/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value. |
raw_string | Use this function to wrap a string and escape it properly for the use in Terraform This is only needed in certain scenarios (e.g., if you have unescaped double quotes in the string). |
abs
{@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it.
num
Required
- Type: typing.Union[int, float]
abspath
{@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory.
path
Required
- Type: str
alltrue
{@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true
if all elements in a given collection are true
or "true"
. It also returns true
if the collection is empty.
list
Required
- Type: typing.List[typing.Any]
anytrue
{@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true
if any element in a given collection is true
or "true"
. It also returns false
if the collection is empty.
list
Required
- Type: typing.List[typing.Any]
base64decode
{@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string.
str
Required
- Type: str
base64encode
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: str
base64gzip
{@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding.
str
Required
- Type: str
base64sha256
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test"))
since sha256()
returns hexadecimal representation.
str
Required
- Type: str
base64sha512
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test"))
since sha512()
returns hexadecimal representation.
str
Required
- Type: str
basename
{@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it.
path
Required
- Type: str
can
{@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors.
expression
Required
- Type: typing.Any
ceil
{@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction.
num
Required
- Type: typing.Union[int, float]
chomp
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: str
chunklist
{@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists.
list
Required
- Type: typing.List[typing.Any]
size
Required
- Type: typing.Union[int, float]
cidrhost
{@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix.
prefix
Required
- Type: str
hostnum
Required
- Type: typing.Union[int, float]
cidrnetmask
{@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefix
Required
- Type: str
cidrsubnet
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.Union[int, float]
netnum
Required
- Type: typing.Union[int, float]
cidrsubnets
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.List[typing.Union[int, float]]
coalesce
{@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string.
vals
Required
- Type: typing.List[typing.Any]
coalescelist
{@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty.
vals
Required
- Type: typing.List[typing.Any]
compact
{@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed.
list
Required
- Type: typing.List[str]
concat
{@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list.
seqs
Required
- Type: typing.List[typing.Any]
contains
{@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
csvdecode
{@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data.
str
Required
- Type: str
dirname
{@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it.
path
Required
- Type: str
distinct
{@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed.
list
Required
- Type: typing.List[typing.Any]
element
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
list
Required
- Type: typing.Any
index
Required
- Type: typing.Union[int, float]
endswith
{@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.
str
Required
- Type: str
suffix
Required
- Type: str
file
{@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string.
path
Required
- Type: str
filebase64
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string.
path
Required
- Type: str
filebase64sha256
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
filebase64sha512
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
fileexists
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: str
filemd5
{@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
fileset
{@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/
) as the path separator for cross-system compatibility.
path
Required
- Type: str
pattern
Required
- Type: str
filesha1
{@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
filesha256
{@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
filesha512
{@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
flatten
{@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
list
Required
- Type: typing.Any
floor
{@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction.
num
Required
- Type: typing.Union[int, float]
format
The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf
function in C, and other similar functions in other programming languages.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
formatdate
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
format
Required
- Type: str
time
Required
- Type: str
formatlist
{@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
indent
{@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
spaces
Required
- Type: typing.Union[int, float]
str
Required
- Type: str
index
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
jsondecode
{@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string.
str
Required
- Type: str
jsonencode
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
val
Required
- Type: typing.Any
keys
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
input_map
Required
- Type: typing.Any
length_of
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
value
Required
- Type: typing.Any
log
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
num
Required
- Type: typing.Union[int, float]
base
Required
- Type: typing.Union[int, float]
lower
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
str
Required
- Type: str
matchkeys
{@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
values
Required
- Type: typing.List[typing.Any]
keys
Required
- Type: typing.List[typing.Any]
searchset
Required
- Type: typing.List[typing.Any]
max
{@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
md5
{@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
merge
{@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments.
maps
Required
- Type: typing.List[typing.Any]
min
{@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
nonsensitive
{@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value.
value
Required
- Type: typing.Any
one
{@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one
returns null
. Otherwise, one
returns the first element. If there are two or more elements then one
will return an error.
list
Required
- Type: typing.Any
parseint
{@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive.
number
Required
- Type: typing.Any
base
Required
- Type: typing.Union[int, float]
pathexpand
{@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~
segment, and if so it replaces that segment with the current user's home directory path.
path
Required
- Type: str
plantimestamp
{@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan.
pow
{@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument.
num
Required
- Type: typing.Union[int, float]
power
Required
- Type: typing.Union[int, float]
regex
{@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings.
pattern
Required
- Type: str
str
Required
- Type: str
regexall
{@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches.
pattern
Required
- Type: str
str
Required
- Type: str
replace
{@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string.
str
Required
- Type: str
substr
Required
- Type: str
replace
Required
- Type: str
reverse
{@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
list
Required
- Type: typing.Any
rsadecrypt
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertext
Required
- Type: str
privatekey
Required
- Type: str
sensitive
{@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables.
value
Required
- Type: typing.Any
setintersection
The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets.
first_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
setproduct
The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product.
sets
Required
- Type: typing.List[typing.Any]
setsubtract
The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set.
a
Required
- Type: typing.List[typing.Any]
b
Required
- Type: typing.List[typing.Any]
setunion
The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets.
first_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
sha1
{@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha256
{@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha512
{@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
signum
{@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign.
num
Required
- Type: typing.Union[int, float]
slice
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
list
Required
- Type: typing.Any
start_index
Required
- Type: typing.Union[int, float]
end_index
Required
- Type: typing.Union[int, float]
sort
{@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically.
list
Required
- Type: typing.List[str]
split
{@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator.
separator
Required
- Type: str
str
Required
- Type: str
startswith
{@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix.
str
Required
- Type: str
prefix
Required
- Type: str
strcontains
{@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it.
str
Required
- Type: str
substr
Required
- Type: str
strrev
{@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected).
str
Required
- Type: str
substr
{@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length.
str
Required
- Type: str
offset
Required
- Type: typing.Union[int, float]
length
Required
- Type: typing.Union[int, float]
sum
{@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers.
list
Required
- Type: typing.Any
templatefile
{@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables.
path
Required
- Type: str
vars
Required
- Type: typing.Any
textdecodebase64
{@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding.
source
Required
- Type: str
encoding
Required
- Type: str
textencodebase64
{@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters.
str
Required
- Type: str
encoding
Required
- Type: str
timeadd
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestamp
Required
- Type: str
duration
Required
- Type: str
timecmp
{@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent.
timestamp_a
Required
- Type: str
timestamp_b
Required
- Type: str
timestamp
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
{@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase.
str
Required
- Type: str
tobool
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: typing.Any
tolist
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: typing.Any
tomap
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: typing.Any
tonumber
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: typing.Any
toset
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: typing.Any
tostring
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: typing.Any
transpose
{@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
values
Required
- Type: typing.Any
trim
{@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string.
str
Required
- Type: str
cutset
Required
- Type: str
trimprefix
{@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged.
str
Required
- Type: str
prefix
Required
- Type: str
trimspace
{@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string.
str
Required
- Type: str
trimsuffix
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
str
Required
- Type: str
suffix
Required
- Type: str
try
{@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors.
expressions
Required
- Type: typing.List[typing.Any]
upper
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
str
Required
- Type: str
urlencode
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: str
uuid
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
{@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID.
namespace
Required
- Type: str
name
Required
- Type: str
values
{@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map.
mapping
Required
- Type: typing.Any
yamldecode
{@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value.
src
Required
- Type: str
yamlencode
{@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax.
value
Required
- Type: typing.Any
zipmap
{@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values.
keys
Required
- Type: typing.List[str]
values
Required
- Type: typing.Any
bcrypt
{@link /terraform/docs/language/functions/bcrypt.html bcrypt} computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems.
str
Required
- Type: str
cost
Optional
- Type: typing.Union[int, float]
conditional
{@link https://developer.hashicorp.com/terraform/language/expressions/conditionals} A conditional expression uses the value of a boolean expression to select one of two values.
condition
Required
- Type: typing.Any
true_value
Required
- Type: typing.Any
false_value
Required
- Type: typing.Any
join
{@link /terraform/docs/language/functions/join.html join} produces a string by concatenating together all elements of a given list of strings with the given delimiter.
separator
Required
- Type: str
list
Required
- Type: typing.List[str]
lookup
{@link /terraform/docs/language/functions/lookup.html lookup} retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead.
input_map
Required
- Type: typing.Any
key
Required
- Type: str
default_value
Optional
- Type: typing.Any
lookup_nested
returns a property access expression that accesses the property at the given path in the given inputMap.
For example lookupNested(x, ["a", "b", "c"]) will return a Terraform expression like x["a"]["b"]["c"]
input_map
Required
- Type: typing.Any
path
Required
- Type: typing.List[typing.Any]
range
{@link /terraform/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value.
start
Required
- Type: typing.Union[int, float]
limit
Required
- Type: typing.Union[int, float]
step
Optional
- Type: typing.Union[int, float]
raw_string
Use this function to wrap a string and escape it properly for the use in Terraform This is only needed in certain scenarios (e.g., if you have unescaped double quotes in the string).
str
Required
- Type: str
FnGenerated
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
abs | {@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it. |
abspath | {@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory. |
alltrue | {@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true" . It also returns true if the collection is empty. |
anytrue | {@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true" . It also returns false if the collection is empty. |
base64decode | {@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string. |
base64encode | {@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string. |
base64gzip | {@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding. |
base64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation. |
base64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation. |
basename | {@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it. |
can | {@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
ceil | {@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
chomp | {@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string. |
chunklist | {@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists. |
cidrhost | {@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix. |
cidrnetmask | {@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
cidrsubnet | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix. |
cidrsubnets | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
coalesce | {@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string. |
coalescelist | {@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty. |
compact | {@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed. |
concat | {@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list. |
contains | {@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements. |
csvdecode | {@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
dirname | {@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it. |
distinct | {@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed. |
element | {@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list. |
endswith | {@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. |
file | {@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string. |
filebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string. |
filebase64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string. |
filebase64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string. |
fileexists | {@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path. |
filemd5 | {@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string. |
fileset | {@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/ ) as the path separator for cross-system compatibility. |
filesha1 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string. |
filesha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string. |
filesha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string. |
flatten | {@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
floor | {@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
format | The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages. |
formatdate | {@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format. |
formatlist | {@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string. |
indent | {@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
index | {@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list. |
jsondecode | {@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string. |
jsonencode | {@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax. |
keys | {@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map. |
length_of | {@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string. |
log | {@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base. |
lower | {@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase. |
matchkeys | {@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
max | {@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set. |
md5 | {@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
merge | {@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
min | {@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set. |
nonsensitive | {@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
one | {@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null . Otherwise, one returns the first element. If there are two or more elements then one will return an error. |
parseint | {@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive. |
pathexpand | {@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path. |
plantimestamp | {@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan. |
pow | {@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument. |
regex | {@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings. |
regexall | {@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches. |
replace | {@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
reverse | {@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
rsadecrypt | {@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
sensitive | {@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables. |
setintersection | The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets. |
setproduct | The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product. |
setsubtract | The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set. |
setunion | The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets. |
sha1 | {@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
signum | {@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
slice | {@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list. |
sort | {@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically. |
split | {@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator. |
startswith | {@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. |
strcontains | {@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it. |
strrev | {@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected). |
substr | {@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length. |
sum | {@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers. |
templatefile | {@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables. |
textdecodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
textencodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
timeadd | {@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp. |
timecmp | {@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. |
timestamp | {@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format. |
title | {@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase. |
tobool | {@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value. |
tolist | {@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value. |
tomap | {@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value. |
tonumber | {@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value. |
toset | {@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value. |
tostring | {@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value. |
transpose | {@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
trim | {@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string. |
trimprefix | {@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged. |
trimspace | {@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string. |
trimsuffix | {@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string. |
try | {@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
upper | {@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase. |
urlencode | {@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string. |
uuid | {@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string. |
uuidv5 | {@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID. |
values | {@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map. |
yamldecode | {@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value. |
yamlencode | {@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax. |
zipmap | {@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values. |
abs
{@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it.
num
Required
- Type: typing.Union[int, float]
abspath
{@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory.
path
Required
- Type: str
alltrue
{@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true
if all elements in a given collection are true
or "true"
. It also returns true
if the collection is empty.
list
Required
- Type: typing.List[typing.Any]
anytrue
{@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true
if any element in a given collection is true
or "true"
. It also returns false
if the collection is empty.
list
Required
- Type: typing.List[typing.Any]
base64decode
{@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string.
str
Required
- Type: str
base64encode
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: str
base64gzip
{@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding.
str
Required
- Type: str
base64sha256
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test"))
since sha256()
returns hexadecimal representation.
str
Required
- Type: str
base64sha512
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test"))
since sha512()
returns hexadecimal representation.
str
Required
- Type: str
basename
{@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it.
path
Required
- Type: str
can
{@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors.
expression
Required
- Type: typing.Any
ceil
{@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction.
num
Required
- Type: typing.Union[int, float]
chomp
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: str
chunklist
{@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists.
list
Required
- Type: typing.List[typing.Any]
size
Required
- Type: typing.Union[int, float]
cidrhost
{@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix.
prefix
Required
- Type: str
hostnum
Required
- Type: typing.Union[int, float]
cidrnetmask
{@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefix
Required
- Type: str
cidrsubnet
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.Union[int, float]
netnum
Required
- Type: typing.Union[int, float]
cidrsubnets
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.List[typing.Union[int, float]]
coalesce
{@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string.
vals
Required
- Type: typing.List[typing.Any]
coalescelist
{@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty.
vals
Required
- Type: typing.List[typing.Any]
compact
{@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed.
list
Required
- Type: typing.List[str]
concat
{@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list.
seqs
Required
- Type: typing.List[typing.Any]
contains
{@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
csvdecode
{@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data.
str
Required
- Type: str
dirname
{@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it.
path
Required
- Type: str
distinct
{@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed.
list
Required
- Type: typing.List[typing.Any]
element
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
list
Required
- Type: typing.Any
index
Required
- Type: typing.Union[int, float]
endswith
{@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.
str
Required
- Type: str
suffix
Required
- Type: str
file
{@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string.
path
Required
- Type: str
filebase64
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string.
path
Required
- Type: str
filebase64sha256
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
filebase64sha512
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
fileexists
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: str
filemd5
{@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
fileset
{@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/
) as the path separator for cross-system compatibility.
path
Required
- Type: str
pattern
Required
- Type: str
filesha1
{@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
filesha256
{@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
filesha512
{@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512
that hashes the contents of a given file rather than a literal string.
path
Required
- Type: str
flatten
{@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
list
Required
- Type: typing.Any
floor
{@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction.
num
Required
- Type: typing.Union[int, float]
format
The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf
function in C, and other similar functions in other programming languages.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
formatdate
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
format
Required
- Type: str
time
Required
- Type: str
formatlist
{@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
indent
{@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
spaces
Required
- Type: typing.Union[int, float]
str
Required
- Type: str
index
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
jsondecode
{@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string.
str
Required
- Type: str
jsonencode
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
val
Required
- Type: typing.Any
keys
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
input_map
Required
- Type: typing.Any
length_of
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
value
Required
- Type: typing.Any
log
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
num
Required
- Type: typing.Union[int, float]
base
Required
- Type: typing.Union[int, float]
lower
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
str
Required
- Type: str
matchkeys
{@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
values
Required
- Type: typing.List[typing.Any]
keys
Required
- Type: typing.List[typing.Any]
searchset
Required
- Type: typing.List[typing.Any]
max
{@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
md5
{@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
merge
{@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments.
maps
Required
- Type: typing.List[typing.Any]
min
{@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
nonsensitive
{@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value.
value
Required
- Type: typing.Any
one
{@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one
returns null
. Otherwise, one
returns the first element. If there are two or more elements then one
will return an error.
list
Required
- Type: typing.Any
parseint
{@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive.
number
Required
- Type: typing.Any
base
Required
- Type: typing.Union[int, float]
pathexpand
{@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~
segment, and if so it replaces that segment with the current user's home directory path.
path
Required
- Type: str
plantimestamp
{@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan.
pow
{@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument.
num
Required
- Type: typing.Union[int, float]
power
Required
- Type: typing.Union[int, float]
regex
{@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings.
pattern
Required
- Type: str
str
Required
- Type: str
regexall
{@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches.
pattern
Required
- Type: str
str
Required
- Type: str
replace
{@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string.
str
Required
- Type: str
substr
Required
- Type: str
replace
Required
- Type: str
reverse
{@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
list
Required
- Type: typing.Any
rsadecrypt
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertext
Required
- Type: str
privatekey
Required
- Type: str
sensitive
{@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables.
value
Required
- Type: typing.Any
setintersection
The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets.
first_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
setproduct
The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product.
sets
Required
- Type: typing.List[typing.Any]
setsubtract
The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set.
a
Required
- Type: typing.List[typing.Any]
b
Required
- Type: typing.List[typing.Any]
setunion
The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets.
first_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
sha1
{@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha256
{@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha512
{@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
signum
{@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign.
num
Required
- Type: typing.Union[int, float]
slice
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
list
Required
- Type: typing.Any
start_index
Required
- Type: typing.Union[int, float]
end_index
Required
- Type: typing.Union[int, float]
sort
{@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically.
list
Required
- Type: typing.List[str]
split
{@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator.
separator
Required
- Type: str
str
Required
- Type: str
startswith
{@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix.
str
Required
- Type: str
prefix
Required
- Type: str
strcontains
{@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it.
str
Required
- Type: str
substr
Required
- Type: str
strrev
{@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected).
str
Required
- Type: str
substr
{@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length.
str
Required
- Type: str
offset
Required
- Type: typing.Union[int, float]
length
Required
- Type: typing.Union[int, float]
sum
{@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers.
list
Required
- Type: typing.Any
templatefile
{@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables.
path
Required
- Type: str
vars
Required
- Type: typing.Any
textdecodebase64
{@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding.
source
Required
- Type: str
encoding
Required
- Type: str
textencodebase64
{@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters.
str
Required
- Type: str
encoding
Required
- Type: str
timeadd
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestamp
Required
- Type: str
duration
Required
- Type: str
timecmp
{@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent.
timestamp_a
Required
- Type: str
timestamp_b
Required
- Type: str
timestamp
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
{@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase.
str
Required
- Type: str
tobool
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: typing.Any
tolist
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: typing.Any
tomap
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: typing.Any
tonumber
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: typing.Any
toset
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: typing.Any
tostring
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: typing.Any
transpose
{@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
values
Required
- Type: typing.Any
trim
{@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string.
str
Required
- Type: str
cutset
Required
- Type: str
trimprefix
{@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged.
str
Required
- Type: str
prefix
Required
- Type: str
trimspace
{@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string.
str
Required
- Type: str
trimsuffix
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
str
Required
- Type: str
suffix
Required
- Type: str
try
{@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors.
expressions
Required
- Type: typing.List[typing.Any]
upper
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
str
Required
- Type: str
urlencode
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: str
uuid
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
{@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID.
namespace
Required
- Type: str
name
Required
- Type: str
values
{@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map.
mapping
Required
- Type: typing.Any
yamldecode
{@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value.
src
Required
- Type: str
yamlencode
{@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax.
value
Required
- Type: typing.Any
zipmap
{@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values.
keys
Required
- Type: typing.List[str]
values
Required
- Type: typing.Any
Lazy
Lazily produce a value.
Can be used to return a string, list or numeric value whose actual value will only be calculated later, during synthesis.
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
any_value | Produces a lazy token from an untyped value. |
list_value | Returns a list-ified token for a lazy value. |
number_value | Returns a numberified token for a lazy value. |
string_value | Returns a stringified token for a lazy value. |
any_value
Produces a lazy token from an untyped value.
producer
Required
- Type: IAnyProducer
The lazy producer.
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty_array
Optional
- Type: bool
- Default: false
If the produced value is an array and it is empty, return 'undefined' instead.
list_value
Returns a list-ified token for a lazy value.
producer
Required
- Type: IListProducer
The producer.
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty
Optional
- Type: bool
- Default: false
If the produced list is empty, return 'undefined' instead.
number_value
Returns a numberified token for a lazy value.
producer
Required
- Type: INumberProducer
The producer.
string_value
Returns a stringified token for a lazy value.
producer
Required
- Type: IStringProducer
The producer.
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
LazyBase
- Implements: IResolvable
Initializers
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
add_post_processor | No description. |
resolve | Produce the Token's value at resolution time. |
to_jso_n | Turn this Token into JSON. |
to_string | Return a string representation of this resolvable object. |
add_post_processor
post_processor
Required
- Type: IPostProcessor
resolve
Produce the Token's value at resolution time.
context
Required
- Type: IResolveContext
to_jso_n
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
ListTerraformIterator
Initializers
Name | Type | Description |
---|---|---|
list | typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]] | No description. |
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ]
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
attribute
Required
- Type: str
name of the property to retrieve.
get_list
attribute
Required
- Type: str
name of the property to retrieve.
get_map
attribute
Required
- Type: str
name of the property to retrieve.
get_number
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
attribute
Required
- Type: str
name of the property to retrieve.
get_string
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
attribute
Required
- Type: str
name of the property to retrieve.
keys
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluck_property
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
property
Required
- Type: str
The property of the iterators values to map to.
values
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
from_data_sources
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | typing.Any | Returns the currently entry in the list or set that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
- Type: typing.Any
Returns the currently entry in the list or set that is being iterated over.
For lists this is the same as iterator.value
. If you need the index,
use count via TerraformCount
:
https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-count
value
Required
- Type: typing.Any
Returns the value of the current item iterated over.
Manifest
- Implements: IManifest
Initializers
Name | Type | Description |
---|---|---|
version | str | No description. |
outdir | str | No description. |
hcl_output | bool | No description. |
version
Required
- Type: str
outdir
Required
- Type: str
hcl_output
Required
- Type: bool
Methods
Name | Description |
---|---|
build_manifest | No description. |
for_stack | No description. |
write_to_file | No description. |
build_manifest
for_stack
stack
Required
- Type: TerraformStack
write_to_file
Properties
Name | Type | Description |
---|---|---|
hcl_output | bool | No description. |
outdir | str | No description. |
stack_file_name | str | No description. |
stacks | typing.Mapping[StackManifest] | No description. |
version | str | No description. |
hcl_output
Required
- Type: bool
outdir
Required
- Type: str
stack_file_name
Required
- Type: str
stacks
Required
- Type: typing.Mapping[StackManifest]
version
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
fileName | str | No description. |
stackMetadataPath | str | No description. |
stacksFolder | str | No description. |
fileName
Required
- Type: str
stackMetadataPath
Required
- Type: str
stacksFolder
Required
- Type: str
MapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
MapTerraformIterator
Initializers
Name | Type | Description |
---|---|---|
map | typing.Union[AnyMap, StringMap, NumberMap, BooleanMap, ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]]] | No description. |
map
Required
- Type: typing.Union[AnyMap, StringMap, NumberMap, BooleanMap, ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]]]
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ]
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
attribute
Required
- Type: str
name of the property to retrieve.
get_list
attribute
Required
- Type: str
name of the property to retrieve.
get_map
attribute
Required
- Type: str
name of the property to retrieve.
get_number
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
attribute
Required
- Type: str
name of the property to retrieve.
get_string
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
attribute
Required
- Type: str
name of the property to retrieve.
keys
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluck_property
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
property
Required
- Type: str
The property of the iterators values to map to.
values
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
from_data_sources
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | str | Returns the key of the current entry in the map that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
- Type: str
Returns the key of the current entry in the map that is being iterated over.
value
Required
- Type: typing.Any
Returns the value of the current item iterated over.
MigrateIds
- Implements: IAspect
For migrating past 0.17 where the feature flag for the old id generation logic was removed after being deprecated since 0.15.
Initializers
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
visit | All aspects can visit an IConstruct. |
visit
All aspects can visit an IConstruct.
node
Required
- Type: constructs.IConstruct
NamedCloudWorkspace
The name of a single Terraform Cloud workspace.
You will only be able to use the workspace specified in the configuration with this working directory, and cannot manage workspaces from the CLI (e.g. terraform workspace select or terraform workspace new).
Initializers
name
Required
- Type: str
project
Optional
- Type: str
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_hcl_terraform | No description. |
to_terraform
to_hcl_terraform
Properties
name
Required
- Type: str
project
Optional
- Type: str
NamedRemoteWorkspace
- Implements: IRemoteWorkspace
Initializers
Name | Type | Description |
---|---|---|
name | str | No description. |
name
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
name | str | No description. |
name
Required
- Type: str
NumberListList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
NumberListMap
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
NumberMap
- Implements: ITerraformAddressable, IResolvable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
lookup
key
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
NumberMapList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
Op
This class contains static functions for all arithmetical and logical operators in the Terraform configuration language.
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
add | Renders left + right. |
and | Renders left && right. |
div | Renders left / right. |
eq | Renders left == right. |
gt | Renders left > right. |
gte | Renders left >= right. |
lt | Renders left < right. |
lte | Renders left < = right. |
mod | Renders left % right. |
mul | Renders left * right. |
negate | Renders -expression. |
neq | Renders left != right. |
not | Renders !expression. |
or | Renders left || right. |
sub | Renders left - right. |
add
Renders left + right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
and
Renders left && right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
div
Renders left / right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
eq
Renders left == right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
gt
Renders left > right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
gte
Renders left >= right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
lt
Renders left < right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
lte
Renders left < = right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
mod
Renders left % right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
mul
Renders left * right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
negate
Renders -expression.
expression
Required
- Type: typing.Any
neq
Renders left != right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
not
Renders !expression.
expression
Required
- Type: typing.Any
or
Renders left || right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
sub
Renders left - right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
PrefixedRemoteWorkspaces
- Implements: IRemoteWorkspace
Initializers
Name | Type | Description |
---|---|---|
prefix | str | No description. |
prefix
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
prefix | str | No description. |
prefix
Required
- Type: str
ResourceTerraformIterator
Initializers
Name | Type | Description |
---|---|---|
element | ITerraformResource | No description. |
element
Required
- Type: ITerraformResource
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ]
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
attribute
Required
- Type: str
name of the property to retrieve.
get_list
attribute
Required
- Type: str
name of the property to retrieve.
get_map
attribute
Required
- Type: str
name of the property to retrieve.
get_number
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
attribute
Required
- Type: str
name of the property to retrieve.
get_string
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
attribute
Required
- Type: str
name of the property to retrieve.
keys
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluck_property
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
property
Required
- Type: str
The property of the iterators values to map to.
values
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
from_data_sources
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | typing.Any | Returns the current entry in the list or set that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
- Type: typing.Any
Returns the current entry in the list or set that is being iterated over.
For lists this is the same as iterator.value
. If you need the index,
use count via TerraformCount
:
https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-count
value
Required
- Type: typing.Any
Returns the value of the current item iterated over.
StringConcat
- Implements: IFragmentConcatenator
Converts all fragments to strings and concats those.
Drops 'undefined's.
Initializers
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
join | Concatenates string fragments. |
join
Concatenates string fragments.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
StringListList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
StringListMap
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
StringMap
- Implements: ITerraformAddressable, IResolvable
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
lookup
key
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
StringMapList
Initializers
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
interpolation_for_attribute
property
Required
- Type: str
resolve
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
- Type: str
TaggedCloudWorkspaces
A set of Terraform Cloud workspace tags.
You will be able to use this working directory with any workspaces that have all of the specified tags, and can use the terraform workspace commands to switch between them or create new workspaces. New workspaces will automatically have the specified tags. This option conflicts with name.
Initializers
tags
Required
- Type: typing.List[str]
project
Optional
- Type: str
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_hcl_terraform | No description. |
to_terraform
to_hcl_terraform
Properties
tags
Required
- Type: typing.List[str]
project
Optional
- Type: str
TerraformCount
Iterator for the Terraform count property.
Methods
Name | Description |
---|---|
to_string | No description. |
to_terraform | No description. |
to_string
to_terraform
Static Functions
Name | Description |
---|---|
is_terraform_count | No description. |
of | No description. |
is_terraform_count
x
Required
- Type: typing.Any
of
count
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
index | typing.Union[int, float] | No description. |
index
Required
- Type: typing.Union[int, float]
TerraformIterator
- Implements: ITerraformIterator
Initializers
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ]
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }
.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
attribute
Required
- Type: str
name of the property to retrieve.
get_list
attribute
Required
- Type: str
name of the property to retrieve.
get_map
attribute
Required
- Type: str
name of the property to retrieve.
get_number
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
attribute
Required
- Type: str
name of the property to retrieve.
get_string
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
attribute
Required
- Type: str
name of the property to retrieve.
keys
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluck_property
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
property
Required
- Type: str
The property of the iterators values to map to.
values
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
from_data_sources
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
TerraformResourceTargets
Initializers
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
add_resource_target | No description. |
get_resource_by_target | No description. |
add_resource_target
resource
Required
- Type: TerraformResource
target
Required
- Type: str
get_resource_by_target
target
Required
- Type: str
TerraformSelf
Expressions in connection blocks cannot refer to their parent resource by name.
References create dependencies, and referring to a resource by name within its own block would create a dependency cycle. Instead, expressions can use the self object, which represents the connection's parent resource and has all of that resource's attributes. For example, use self.public_ip to reference an aws_instance's public_ip attribute.
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
get_any | Only usable within a connection block to reference the connections parent resource. |
get_number | Only usable within a connection block to reference the connections parent resource. |
get_string | Only usable within a connection block to reference the connections parent resource. |
get_any
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getAny("hostPort")
key
Required
- Type: str
get_number
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getNumber("hostPort")
key
Required
- Type: str
get_string
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getString("publicIp")
key
Required
- Type: str
Testing
Testing utilities for cdktf applications.
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
app | Returns an app for testing with the following properties: - Output directory is a temp dir. |
enable_future_flags | No description. |
fake_cdktf_json_path | No description. |
full_synth | No description. |
render_construct_tree | No description. |
setup_jest | No description. |
stub_version | No description. |
synth | Returns the Terraform synthesized JSON. |
synth_hcl | Returns the Terraform synthesized JSON. |
synth_scope | No description. |
to_be_valid_terraform | No description. |
to_have_data_source | No description. |
to_have_data_source_with_properties | No description. |
to_have_provider | No description. |
to_have_provider_with_properties | No description. |
to_have_resource | No description. |
to_have_resource_with_properties | No description. |
app
Returns an app for testing with the following properties: - Output directory is a temp dir.
context
Optional
- Type: typing.Mapping[typing.Any]
enable_future_flags
Optional
- Type: bool
fake_cdktf_json_path
Optional
- Type: bool
outdir
Optional
- Type: str
stack_traces
Optional
- Type: bool
stub_version
Optional
- Type: bool
enable_future_flags
app
Required
- Type: App
fake_cdktf_json_path
app
Required
- Type: App
full_synth
stack
Required
- Type: TerraformStack
render_construct_tree
construct
Required
- Type: constructs.IConstruct
setup_jest
stub_version
app
Required
- Type: App
synth
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
run_validations
Optional
- Type: bool
synth_hcl
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
run_validations
Optional
- Type: bool
return_metadata
Optional
- Type: bool
synth_scope
fn
Required
- Type: IScopeCallback
to_be_valid_terraform
received
Required
- Type: str
to_have_data_source
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_data_source_with_properties
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
to_have_provider
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_provider_with_properties
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
to_have_resource
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_resource_with_properties
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
Token
Represents a special or lazily-evaluated value.
Can be used to delay evaluation of a certain value in case, for example, that it requires some context or late-bound data. Can also be used to mark values that need special processing at document rendering time.
Tokens can be embedded into strings while retaining their original semantics.
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
as_any | Return a resolvable representation of the given value. |
as_any_map | Return a reversible map representation of this token. |
as_boolean_map | Return a reversible map representation of this token. |
as_list | Return a reversible list representation of this token. |
as_map | Return a reversible map representation of this token. |
as_number | Return a reversible number representation of this token. |
as_number_list | Return a reversible list representation of this token. |
as_number_map | Return a reversible map representation of this token. |
as_string | Return a reversible string representation of this token. |
as_string_map | Return a reversible map representation of this token. |
is_unresolved | Returns true if obj represents an unresolved value. |
null_value | Return a Token containing a null value. |
as_any
Return a resolvable representation of the given value.
value
Required
- Type: typing.Any
as_any_map
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_boolean_map
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_list
Return a reversible list representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_map
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
map_value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_number
Return a reversible number representation of this token.
value
Required
- Type: typing.Any
as_number_list
Return a reversible list representation of this token.
value
Required
- Type: typing.Any
as_number_map
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_string
Return a reversible string representation of this token.
If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.
Strings with quoted Tokens in them can be restored back into
complex values with the Tokens restored by calling resolve()
on the string.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_string_map
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
is_unresolved
Returns true if obj represents an unresolved value.
One of these must be true:
obj
is an IResolvableobj
is a string containing at least one encodedIResolvable
obj
is either an encoded number or list
This does NOT recurse into lists or objects to see if they containing resolvables.
obj
Required
- Type: typing.Any
The object to test.
null_value
Return a Token containing a null
value.
Note: This is different than undefined
, nil
, None
or similar
as it will end up in the Terraform config and can be used to explicitly
not set an attribute (which is sometimes required by Terraform providers)
Constants
Name | Type | Description |
---|---|---|
ANY_MAP_TOKEN_VALUE | str | Any map token representation. |
NUMBER_MAP_TOKEN_VALUE | typing.Union[int, float] | Number Map token value representation. |
STRING_MAP_TOKEN_VALUE | str | String Map token value representation. |
ANY_MAP_TOKEN_VALUE
Required
- Type: str
Any map token representation.
NUMBER_MAP_TOKEN_VALUE
Required
- Type: typing.Union[int, float]
Number Map token value representation.
STRING_MAP_TOKEN_VALUE
Required
- Type: str
String Map token value representation.
Tokenization
Less oft-needed functions to manipulate Tokens.
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
is_resolvable | Return whether the given object is an IResolvable object. |
resolve | Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays. |
reverse | Reverse any value into Resolvables, if possible. |
reverse_list | Un-encode a Tokenized value from a list. |
reverse_map | Un-encode a Tokenized value from a map. |
reverse_number | Un-encode a Tokenized value from a number. |
reverse_number_list | Un-encode a Tokenized value from a list. |
reverse_string | Un-encode a string potentially containing encoded tokens. |
stringify_number | Stringify a number directly or lazily if it's a Token. |
is_resolvable
Return whether the given object is an IResolvable object.
This is different from Token.isUnresolved() which will also check for encoded Tokens, whereas this method will only do a type check on the given object.
obj
Required
- Type: typing.Any
resolve
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays.
Values can only be primitives, arrays or tokens. Other objects (i.e. with methods) will be rejected.
obj
Required
- Type: typing.Any
The object to resolve.
resolver
Required
- Type: ITokenResolver
The resolver to apply to any resolvable tokens found.
scope
Required
- Type: constructs.IConstruct
The scope from which resolution is performed.
preparing
Optional
- Type: bool
- Default: false
Whether the resolution is being executed during the prepare phase or not.
reverse
Reverse any value into Resolvables, if possible.
x
Required
- Type: typing.Any
reverse_list
Un-encode a Tokenized value from a list.
l
Required
- Type: typing.List[str]
reverse_map
Un-encode a Tokenized value from a map.
m
Required
- Type: typing.Mapping[typing.Any]
reverse_number
Un-encode a Tokenized value from a number.
n
Required
- Type: typing.Union[int, float]
reverse_number_list
Un-encode a Tokenized value from a list.
l
Required
- Type: typing.List[typing.Union[int, float]]
reverse_string
Un-encode a string potentially containing encoded tokens.
s
Required
- Type: str
stringify_number
Stringify a number directly or lazily if it's a Token.
If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is.
x
Required
- Type: typing.Union[int, float]
TokenizedStringFragments
Fragments of a concatenated string containing stringified Tokens.
Initializers
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
add_escape | No description. |
add_intrinsic | Adds an intrinsic fragment. |
add_literal | Adds a literal fragment. |
add_token | Adds a token fragment. |
concat | No description. |
join | Combine the string fragments using the given joiner. |
map_tokens | Apply a transformation function to all tokens in the string. |
add_escape
kind
Required
- Type: str
add_intrinsic
Adds an intrinsic fragment.
value
Required
- Type: typing.Any
the intrinsic value to add.
add_literal
Adds a literal fragment.
lit
Required
- Type: typing.Any
the literal to add.
add_token
Adds a token fragment.
token
Required
- Type: IResolvable
the token to add.
concat
other
Required
- Type: TokenizedStringFragments
join
Combine the string fragments using the given joiner.
If there are any
concat
Required
- Type: IFragmentConcatenator
map_tokens
Apply a transformation function to all tokens in the string.
context
Required
- Type: IResolveContext
Properties
Name | Type | Description |
---|---|---|
escapes | typing.List[IResolvable] | Return all escape fragments from this string. |
first_value | typing.Any | Returns the first value. |
intrinsic | typing.List[IResolvable] | Return all intrinsic fragments from this string. |
length | typing.Union[int, float] | Returns the number of fragments. |
literals | typing.List[IResolvable] | Return all literals from this string. |
tokens | typing.List[IResolvable] | Return all Tokens from this string. |
first_token | IResolvable | Returns the first token. |
escapes
Required
- Type: typing.List[IResolvable]
Return all escape fragments from this string.
first_value
Required
- Type: typing.Any
Returns the first value.
intrinsic
Required
- Type: typing.List[IResolvable]
Return all intrinsic fragments from this string.
length
Required
- Type: typing.Union[int, float]
Returns the number of fragments.
literals
Required
- Type: typing.List[IResolvable]
Return all literals from this string.
tokens
Required
- Type: typing.List[IResolvable]
Return all Tokens from this string.
first_token
Optional
- Type: IResolvable
Returns the first token.
VariableType
Initializers
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
list | No description. |
map | No description. |
object | No description. |
set | No description. |
tuple | No description. |
list
type
Required
- Type: str
map
type
Required
- Type: str
object
attributes
Required
- Type: typing.Mapping[str]
set
type
Required
- Type: str
tuple
elements
Required
- Type: str
Constants
Name | Type | Description |
---|---|---|
ANY | str | No description. |
BOOL | str | No description. |
LIST | str | No description. |
LIST_BOOL | str | No description. |
LIST_NUMBER | str | No description. |
LIST_STRING | str | No description. |
MAP | str | No description. |
MAP_BOOL | str | No description. |
MAP_NUMBER | str | No description. |
MAP_STRING | str | No description. |
NUMBER | str | No description. |
SET | str | No description. |
SET_BOOL | str | No description. |
SET_NUMBER | str | No description. |
SET_STRING | str | No description. |
STRING | str | No description. |
ANY
Required
- Type: str
BOOL
Required
- Type: str
LIST
Required
- Type: str
LIST_BOOL
Required
- Type: str
LIST_NUMBER
Required
- Type: str
LIST_STRING
Required
- Type: str
MAP
Required
- Type: str
MAP_BOOL
Required
- Type: str
MAP_NUMBER
Required
- Type: str
MAP_STRING
Required
- Type: str
NUMBER
Required
- Type: str
SET
Required
- Type: str
SET_BOOL
Required
- Type: str
SET_NUMBER
Required
- Type: str
SET_STRING
Required
- Type: str
STRING
Required
- Type: str
Protocols
IAnyProducer
- Implemented By: IAnyProducer
Interface for lazy untyped value producers.
Methods
Name | Description |
---|---|
produce | Produce the value. |
produce
Produce the value.
context
Required
- Type: IResolveContext
IAspect
- Implemented By: MigrateIds, IAspect
Represents an Aspect.
Methods
Name | Description |
---|---|
visit | All aspects can visit an IConstruct. |
visit
All aspects can visit an IConstruct.
node
Required
- Type: constructs.IConstruct
IFragmentConcatenator
- Implemented By: StringConcat, IFragmentConcatenator
Function used to concatenate symbols in the target document language.
Interface so it could potentially be exposed over jsii.
Methods
Name | Description |
---|---|
join | Join the fragment on the left and on the right. |
join
Join the fragment on the left and on the right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
IImportableConfig
- Implemented By: IImportableConfig
Properties
Name | Type | Description |
---|---|---|
import_id | str | No description. |
terraform_resource_type | str | No description. |
provider | TerraformProvider | No description. |
import_id
Required
- Type: str
terraform_resource_type
Required
- Type: str
provider
Optional
- Type: TerraformProvider
IInterpolatingParent
- Implemented By: AnyMapList, BooleanMapList, ComplexComputedList, ComplexObject, DataResource, MapList, NumberMapList, StringMapList, TerraformDataSource, TerraformResource, IInterpolatingParent
Methods
Name | Description |
---|---|
interpolation_for_attribute | No description. |
interpolation_for_attribute
terraform_attribute
Required
- Type: str
IListProducer
- Implemented By: IListProducer
Interface for lazy list producers.
Methods
Name | Description |
---|---|
produce | Produce the list value. |
produce
Produce the list value.
context
Required
- Type: IResolveContext
IManifest
Properties
Name | Type | Description |
---|---|---|
stacks | typing.Mapping[StackManifest] | No description. |
version | str | No description. |
stacks
Required
- Type: typing.Mapping[StackManifest]
version
Required
- Type: str
INumberProducer
- Implemented By: INumberProducer
Interface for lazy number producers.
Methods
Name | Description |
---|---|
produce | Produce the number value. |
produce
Produce the number value.
context
Required
- Type: IResolveContext
IPostProcessor
- Implemented By: IPostProcessor
A Token that can post-process the complete resolved value, after resolve() has recursed over it.
Methods
Name | Description |
---|---|
post_process | Process the completely resolved value, after full recursion/resolution has happened. |
post_process
Process the completely resolved value, after full recursion/resolution has happened.
input
Required
- Type: typing.Any
context
Required
- Type: IResolveContext
IRemoteWorkspace
- Implemented By: NamedRemoteWorkspace, PrefixedRemoteWorkspaces, IRemoteWorkspace
IResolvable
- Implemented By: AnyListList, AnyListMap, AnyMap, AnyMapList, BooleanList, BooleanListList, BooleanListMap, BooleanMap, BooleanMapList, ComplexComputedList, ComplexList, ComplexMap, ComplexObject, LazyBase, MapList, NumberListList, NumberListMap, NumberMap, NumberMapList, StringListList, StringListMap, StringMap, StringMapList, IResolvable
Interface for values that can be resolvable later.
Tokens are special objects that participate in synthesis.
Methods
Name | Description |
---|---|
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
resolve
Produce the Token's value at resolution time.
context
Required
- Type: IResolveContext
to_string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
creation_stack
Required
- Type: typing.List[str]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
IResolveContext
- Implemented By: IResolveContext
Current resolution context for tokens.
Methods
Name | Description |
---|---|
register_post_processor | Use this postprocessor after the entire token structure has been resolved. |
resolve | Resolve an inner object. |
register_post_processor
Use this postprocessor after the entire token structure has been resolved.
post_processor
Required
- Type: IPostProcessor
resolve
Resolve an inner object.
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
preparing | bool | True when we are still preparing, false if we're rendering the final output. |
scope | constructs.IConstruct | The scope from which resolution has been initiated. |
ignore_escapes | bool | True when ${} should not be parsed, and treated as literals. |
iterator_context | str | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. |
suppress_braces | bool | True when ${} should be ommitted (because already inside them), false otherwise. |
warn_escapes | bool | True when ${} should not be included in the string to be resolved, outputs a warning. |
preparing
Required
- Type: bool
True when we are still preparing, false if we're rendering the final output.
scope
Required
- Type: constructs.IConstruct
The scope from which resolution has been initiated.
ignore_escapes
Optional
- Type: bool
True when ${} should not be parsed, and treated as literals.
iterator_context
Optional
- Type: str
TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key.
suppress_braces
Optional
- Type: bool
True when ${} should be ommitted (because already inside them), false otherwise.
warn_escapes
Optional
- Type: bool
True when ${} should not be included in the string to be resolved, outputs a warning.
Default: false
IResource
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stack | TerraformStack | The stack in which this resource is defined. |
node
Required
- Type: constructs.Node
The tree node.
stack
Required
- Type: TerraformStack
The stack in which this resource is defined.
IResourceConstructor
- Implemented By: IResourceConstructor
IScopeCallback
- Implemented By: IScopeCallback
IStackSynthesizer
- Implemented By: IStackSynthesizer
Encodes information how a certain Stack should be deployed inspired by AWS CDK v2 implementation (synth functionality was removed in constructs v10).
Methods
Name | Description |
---|---|
synthesize | Synthesize the associated stack to the session. |
synthesize
Synthesize the associated stack to the session.
session
Required
- Type: ISynthesisSession
IStringProducer
- Implemented By: IStringProducer
Interface for lazy string producers.
Methods
Name | Description |
---|---|
produce | Produce the string value. |
produce
Produce the string value.
context
Required
- Type: IResolveContext
ISynthesisSession
- Implemented By: ISynthesisSession
Represents a single session of synthesis.
Passed into TerraformStack.onSynthesize()
methods.
originally from aws/constructs lib v3.3.126 (synth functionality was removed in constructs v10)
Properties
Name | Type | Description |
---|---|---|
manifest | Manifest | No description. |
outdir | str | The output directory for this synthesis session. |
skip_validation | bool | No description. |
manifest
Required
- Type: Manifest
outdir
Required
- Type: str
The output directory for this synthesis session.
skip_validation
Optional
- Type: bool
ITerraformAddressable
- Implemented By: AnyListList, AnyListMap, AnyMap, AnyMapList, BooleanList, BooleanListList, BooleanListMap, BooleanMap, BooleanMapList, ComplexComputedList, ComplexList, ComplexMap, ComplexObject, DataResource, DataTerraformRemoteState, DataTerraformRemoteStateAzurerm, DataTerraformRemoteStateConsul, DataTerraformRemoteStateCos, DataTerraformRemoteStateGcs, DataTerraformRemoteStateHttp, DataTerraformRemoteStateLocal, DataTerraformRemoteStateOss, DataTerraformRemoteStatePg, DataTerraformRemoteStateS3, DataTerraformRemoteStateSwift, MapList, NumberListList, NumberListMap, NumberMap, NumberMapList, StringListList, StringListMap, StringMap, StringMapList, TerraformDataSource, TerraformHclModule, TerraformLocal, TerraformModule, TerraformRemoteState, TerraformResource, TerraformVariable, ITerraformAddressable, ITerraformDependable
Properties
Name | Type | Description |
---|---|---|
fqn | str | No description. |
fqn
Required
- Type: str
ITerraformDependable
Extends: ITerraformAddressable
Implemented By: DataResource, TerraformDataSource, TerraformHclModule, TerraformModule, TerraformResource, ITerraformDependable
Properties
Name | Type | Description |
---|---|---|
fqn | str | No description. |
fqn
Required
- Type: str
ITerraformIterator
- Implemented By: DynamicListTerraformIterator, ListTerraformIterator, MapTerraformIterator, ResourceTerraformIterator, TerraformIterator, ITerraformIterator
ITerraformResource
- Implemented By: DataResource, TerraformDataSource, TerraformResource, ITerraformResource
Methods
Name | Description |
---|---|
interpolation_for_attribute | No description. |
interpolation_for_attribute
terraform_attribute
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
fqn | str | No description. |
friendly_unique_id | str | No description. |
terraform_resource_type | str | No description. |
count | typing.Union[typing.Union[int, float], TerraformCount] | No description. |
depends_on | typing.List[str] | No description. |
for_each | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
fqn
Required
- Type: str
friendly_unique_id
Required
- Type: str
terraform_resource_type
Required
- Type: str
count
Optional
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
- Type: typing.List[str]
for_each
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
ITokenMapper
- Implemented By: ITokenMapper
Interface to apply operation to tokens in a string.
Interface so it can be exported via jsii.
Methods
Name | Description |
---|---|
map_token | Replace a single token. |
map_token
Replace a single token.
t
Required
- Type: IResolvable
ITokenResolver
- Implemented By: DefaultTokenResolver, ITokenResolver
How to resolve tokens.
Methods
Name | Description |
---|---|
resolve_list | Resolve a tokenized list. |
resolve_map | Resolve a tokenized map. |
resolve_number_list | Resolve a tokenized number list. |
resolve_string | Resolve a string with at least one stringified token in it. |
resolve_token | Resolve a single token. |
resolve_list
Resolve a tokenized list.
l
Required
- Type: typing.List[str]
context
Required
- Type: IResolveContext
resolve_map
Resolve a tokenized map.
m
Required
- Type: typing.Mapping[typing.Any]
context
Required
- Type: IResolveContext
resolve_number_list
Resolve a tokenized number list.
l
Required
- Type: typing.List[typing.Union[int, float]]
context
Required
- Type: IResolveContext
resolve_string
Resolve a string with at least one stringified token in it.
(May use concatenation)
s
Required
- Type: TokenizedStringFragments
context
Required
- Type: IResolveContext
resolve_token
Resolve a single token.
t
Required
- Type: IResolvable
context
Required
- Type: IResolveContext
post_processor
Required
- Type: IPostProcessor