API Reference for Python
Constructs
App
Represents a cdktf application.
Initializers
import cdktf
cdktf.App(
context: typing.Mapping[typing.Any] = None,
hcl_output: bool = None,
outdir: str = None,
skip_backend_validation: bool = None,
skip_validation: bool = None,
stack_traces: bool = None
)
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
def to_string() - > str
Returns a string representation of this construct.
cross_stack_reference
def cross_stack_reference(
from_stack: TerraformStack,
to_stack: TerraformStack,
identifier: str
) - > str
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
def synth() - > None
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
import cdktf
cdktf.App.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_app
import cdktf
cdktf.App.is_app(
x: typing.Any
)
x
Required
- Type: typing.Any
of
import cdktf
cdktf.App.of(
construct: IConstruct
)
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
node: Node
- Type: constructs.Node
The tree node.
hcl_output
Required
hcl_output: bool
- Type: bool
manifest
Required
manifest: Manifest
- Type: Manifest
outdir
Required
outdir: str
- Type: str
The output directory into which resources will be synthesized.
skip_backend_validation
Required
skip_backend_validation: bool
- Type: bool
Whether to skip backend validation during synthesis of the app.
skip_validation
Required
skip_validation: bool
- Type: bool
Whether to skip all validations during synthesis of the app.
target_stack_id
Optional
target_stack_id: str
- Type: str
The stack which will be synthesized.
If not set, all stacks will be synthesized.
AzurermBackend
Initializers
import cdktf
cdktf.AzurermBackend(
scope: Construct,
container_name: str,
key: str,
storage_account_name: str,
access_key: str = None,
client_certificate_password: str = None,
client_certificate_path: str = None,
client_id: str = None,
client_secret: str = None,
endpoint: str = None,
environment: str = None,
metadata_host: str = None,
msi_endpoint: str = None,
oidc_request_token: str = None,
oidc_request_url: str = None,
oidc_token: str = None,
oidc_token_file_path: str = None,
resource_group_name: str = None,
sas_token: str = None,
snapshot: bool = None,
subscription_id: str = None,
tenant_id: str = None,
use_azuread_auth: bool = None,
use_microsoft_graph: bool = None,
use_msi: bool = None,
use_oidc: bool = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.AzurermBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.AzurermBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.AzurermBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- 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
import cdktf
cdktf.CloudBackend(
scope: Construct,
organization: str,
workspaces: typing.Union[NamedCloudWorkspace, TaggedCloudWorkspaces],
hostname: str = None,
token: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.CloudBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.CloudBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.CloudBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
ConsulBackend
Initializers
import cdktf
cdktf.ConsulBackend(
scope: Construct,
access_token: str,
path: str,
address: str = None,
ca_file: str = None,
cert_file: str = None,
datacenter: str = None,
gzip: bool = None,
http_auth: str = None,
key_file: str = None,
lock: bool = None,
scheme: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.ConsulBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.ConsulBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.ConsulBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
CosBackend
Initializers
import cdktf
cdktf.CosBackend(
scope: Construct,
bucket: str,
accelerate: bool = None,
acl: str = None,
assume_role: CosBackendAssumeRole = None,
domain: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
region: str = None,
secret_id: str = None,
secret_key: str = None,
security_token: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.CosBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.CosBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.CosBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- 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
import cdktf
cdktf.DataResource(
scope: Construct,
id: str,
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
count: typing.Union[typing.Union[int, float], TerraformCount] = None,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
lifecycle: TerraformResourceLifecycle = None,
provider: TerraformProvider = None,
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] = None,
input: typing.Mapping[typing.Any] = None,
triggers_replace: typing.Mapping[typing.Any] = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
add_move_target
def add_move_target(
move_target: str
) - > None
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
def get_any_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Any]
terraform_attribute
Required
- Type: str
get_boolean_attribute
def get_boolean_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
def get_boolean_map_attribute(
terraform_attribute: str
) - > typing.Mapping[bool]
terraform_attribute
Required
- Type: str
get_list_attribute
def get_list_attribute(
terraform_attribute: str
) - > typing.List[str]
terraform_attribute
Required
- Type: str
get_number_attribute
def get_number_attribute(
terraform_attribute: str
) - > typing.Union[int, float]
terraform_attribute
Required
- Type: str
get_number_list_attribute
def get_number_list_attribute(
terraform_attribute: str
) - > typing.List[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_number_map_attribute
def get_number_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_string_attribute
def get_string_attribute(
terraform_attribute: str
) - > str
terraform_attribute
Required
- Type: str
get_string_map_attribute
def get_string_map_attribute(
terraform_attribute: str
) - > typing.Mapping[str]
terraform_attribute
Required
- Type: str
has_resource_move
def has_resource_move() - > typing.Union[TerraformResourceMoveByTarget, TerraformResourceMoveById]
import_from
def import_from(
id: str,
provider: TerraformProvider = None
) - > None
id
Required
- Type: str
provider
Optional
- Type: TerraformProvider
interpolation_for_attribute
def interpolation_for_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
move_from_id
def move_from_id(
id: str
) - > None
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
def move_to(
move_target: str,
index: typing.Union[str, typing.Union[int, float]] = None
) - > None
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
def move_to_id(
id: str
) - > None
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
def reset_input() - > None
reset_triggers_replace
def reset_triggers_replace() - > None
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
import cdktf
cdktf.DataResource.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataResource.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_terraform_resource
import cdktf
cdktf.DataResource.is_terraform_resource(
x: typing.Any
)
x
Required
- Type: typing.Any
generate_config_for_import
import cdktf
cdktf.DataResource.generate_config_for_import(
scope: Construct,
import_to_id: str,
import_from_id: str,
provider: TerraformProvider = None
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
terraform_meta_arguments
Required
terraform_meta_arguments: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
terraform_resource_type: str
- Type: str
terraform_generator_metadata
Optional
terraform_generator_metadata: TerraformProviderGeneratorMetadata
connection
Optional
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
count: typing.Union[typing.Union[int, float], TerraformCount]
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
depends_on: typing.List[str]
- Type: typing.List[str]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
lifecycle
Optional
lifecycle: TerraformResourceLifecycle
provider
Optional
provider: TerraformProvider
- Type: TerraformProvider
provisioners
Optional
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
id
Required
id: str
- Type: str
output
Required
output: AnyMap
- Type: AnyMap
input_input
Optional
input_input: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
triggers_replace_input
Optional
triggers_replace_input: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
input
Required
input: typing.Mapping[typing.Any]
- 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
triggers_replace: typing.Mapping[typing.Any]
- 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
tfResourceType: str
- Type: str
DataTerraformRemoteState
Initializers
import cdktf
cdktf.DataTerraformRemoteState(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
organization: str,
workspaces: IRemoteWorkspace,
hostname: str = None,
token: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteState.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteState.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateAzurerm
Initializers
import cdktf
cdktf.DataTerraformRemoteStateAzurerm(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
container_name: str,
key: str,
storage_account_name: str,
access_key: str = None,
client_certificate_password: str = None,
client_certificate_path: str = None,
client_id: str = None,
client_secret: str = None,
endpoint: str = None,
environment: str = None,
metadata_host: str = None,
msi_endpoint: str = None,
oidc_request_token: str = None,
oidc_request_url: str = None,
oidc_token: str = None,
oidc_token_file_path: str = None,
resource_group_name: str = None,
sas_token: str = None,
snapshot: bool = None,
subscription_id: str = None,
tenant_id: str = None,
use_azuread_auth: bool = None,
use_microsoft_graph: bool = None,
use_msi: bool = None,
use_oidc: bool = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateAzurerm.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateAzurerm.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateConsul
Initializers
import cdktf
cdktf.DataTerraformRemoteStateConsul(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
access_token: str,
path: str,
address: str = None,
ca_file: str = None,
cert_file: str = None,
datacenter: str = None,
gzip: bool = None,
http_auth: str = None,
key_file: str = None,
lock: bool = None,
scheme: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateConsul.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateConsul.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateCos
Initializers
import cdktf
cdktf.DataTerraformRemoteStateCos(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
accelerate: bool = None,
acl: str = None,
assume_role: CosBackendAssumeRole = None,
domain: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
region: str = None,
secret_id: str = None,
secret_key: str = None,
security_token: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateCos.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateCos.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateGcs
Initializers
import cdktf
cdktf.DataTerraformRemoteStateGcs(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
access_token: str = None,
credentials: str = None,
encryption_key: str = None,
impersonate_service_account: str = None,
impersonate_service_account_delegates: typing.List[str] = None,
kms_encryption_key: str = None,
prefix: str = None,
storeage_custom_endpoint: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateGcs.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateGcs.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateHttp
Initializers
import cdktf
cdktf.DataTerraformRemoteStateHttp(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
address: str,
client_ca_certificate_pem: str = None,
client_certificate_pem: str = None,
client_private_key_pem: str = None,
lock_address: str = None,
lock_method: str = None,
password: str = None,
retry_max: typing.Union[int, float] = None,
retry_wait_max: typing.Union[int, float] = None,
retry_wait_min: typing.Union[int, float] = None,
skip_cert_verification: bool = None,
unlock_address: str = None,
unlock_method: str = None,
update_method: str = None,
username: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateHttp.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateHttp.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateLocal
Initializers
import cdktf
cdktf.DataTerraformRemoteStateLocal(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
path: str = None,
workspace_dir: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateLocal.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateLocal.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateOss
Initializers
import cdktf
cdktf.DataTerraformRemoteStateOss(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
access_key: str = None,
acl: str = None,
assume_role: OssAssumeRole = None,
assume_role_policy: str = None,
assume_role_role_arn: str = None,
assume_role_session_expiration: typing.Union[int, float] = None,
assume_role_session_name: str = None,
ecs_role_name: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
profile: str = None,
region: str = None,
secret_key: str = None,
security_token: str = None,
shared_credentials_file: str = None,
sts_endpoint: str = None,
tablestore_endpoint: str = None,
tablestore_table: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateOss.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateOss.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStatePg
Initializers
import cdktf
cdktf.DataTerraformRemoteStatePg(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
conn_str: str,
schema_name: str = None,
skip_index_creation: bool = None,
skip_schema_creation: bool = None,
skip_table_creation: bool = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStatePg.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStatePg.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateS3
Initializers
import cdktf
cdktf.DataTerraformRemoteStateS3(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
key: str,
access_key: str = None,
acl: str = None,
allowed_account_ids: str = None,
assume_role: S3BackendAssumeRoleConfig = None,
assume_role_policy: str = None,
assume_role_policy_arns: typing.List[str] = None,
assume_role_tags: typing.Mapping[str] = None,
assume_role_transitive_tag_keys: typing.List[str] = None,
assume_role_with_web_identity: S3BackendAssumeRoleWithWebIdentityConfig = None,
custom_ca_bundle: str = None,
dynamodb_endpoint: str = None,
dynamodb_table: str = None,
ec2_metadata_service_endpoint: str = None,
ec2_metadata_service_endpoint_mode: str = None,
encrypt: bool = None,
endpoint: str = None,
endpoints: S3BackendEndpointConfig = None,
external_id: str = None,
forbidden_account_ids: str = None,
force_path_style: bool = None,
http_proxy: str = None,
https_proxy: str = None,
iam_endpoint: str = None,
insecure: bool = None,
kms_key_id: str = None,
max_retries: typing.Union[int, float] = None,
no_proxy: str = None,
profile: str = None,
region: str = None,
retry_mode: str = None,
role_arn: str = None,
secret_key: str = None,
session_name: str = None,
shared_config_files: typing.List[str] = None,
shared_credentials_file: str = None,
shared_credentials_files: typing.List[str] = None,
skip_credentials_validation: bool = None,
skip_metadata_api_check: bool = None,
skip_region_validation: bool = None,
skip_requesting_account_id: bool = None,
skip_s3_checksum: bool = None,
sse_customer_key: str = None,
sts_endpoint: str = None,
sts_region: str = None,
token: str = None,
use_legacy_workflow: bool = None,
use_path_style: bool = None,
workspace_key_prefix: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.DataTerraformRemoteStateS3.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateS3.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
DataTerraformRemoteStateSwift
Initializers
import cdktf
cdktf.DataTerraformRemoteStateSwift(
scope: Construct,
id: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
container: str,
application_credential_id: str = None,
application_credential_name: str = None,
application_credential_secret: str = None,
archive_container: str = None,
auth_url: str = None,
cacert_file: str = None,
cert: str = None,
cloud: str = None,
default_domain: str = None,
domain_id: str = None,
domain_name: str = None,
expire_after: str = None,
insecure: bool = None,
key: str = None,
password: str = None,
project_domain_id: str = None,
project_domain_name: str = None,
region_name: str = None,
state_name: str = None,
tenant_id: str = None,
tenant_name: str = None,
token: str = None,
user_domain_id: str = None,
user_domain_name: str = None,
user_id: str = None,
user_name: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
to_metadata
def to_metadata() - > typing.Any
to_terraform
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
get_string
def get_string(
output: str
) - > str
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
import cdktf
cdktf.DataTerraformRemoteStateSwift.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
is_terraform_element
import cdktf
cdktf.DataTerraformRemoteStateSwift.is_terraform_element(
x: typing.Any
)
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.
node: Node
- 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.
cdktf_stack: TerraformStack
- 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.
fqn: str
- 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.
friendly_unique_id: str
- 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.
tfResourceType: str
- Type: str
GcsBackend
Initializers
import cdktf
cdktf.GcsBackend(
scope: Construct,
bucket: str,
access_token: str = None,
credentials: str = None,
encryption_key: str = None,
impersonate_service_account: str = None,
impersonate_service_account_delegates: typing.List[str] = None,
kms_encryption_key: str = None,
prefix: str = None,
storeage_custom_endpoint: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.GcsBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.GcsBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.GcsBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
HttpBackend
Initializers
import cdktf
cdktf.HttpBackend(
scope: Construct,
address: str,
client_ca_certificate_pem: str = None,
client_certificate_pem: str = None,
client_private_key_pem: str = None,
lock_address: str = None,
lock_method: str = None,
password: str = None,
retry_max: typing.Union[int, float] = None,
retry_wait_max: typing.Union[int, float] = None,
retry_wait_min: typing.Union[int, float] = None,
skip_cert_verification: bool = None,
unlock_address: str = None,
unlock_method: str = None,
update_method: str = None,
username: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.HttpBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.HttpBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.HttpBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
ImportableResource
Class used to represent an importable resource.
Initializers
import cdktf
cdktf.ImportableResource(
scope: Construct,
name: str,
config: IImportableConfig
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.ImportableResource.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.ImportableResource.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
LocalBackend
Initializers
import cdktf
cdktf.LocalBackend(
scope: Construct,
path: str = None,
workspace_dir: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
from_stack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.LocalBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.LocalBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.LocalBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
OssBackend
Initializers
import cdktf
cdktf.OssBackend(
scope: Construct,
bucket: str,
access_key: str = None,
acl: str = None,
assume_role: OssAssumeRole = None,
assume_role_policy: str = None,
assume_role_role_arn: str = None,
assume_role_session_expiration: typing.Union[int, float] = None,
assume_role_session_name: str = None,
ecs_role_name: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
profile: str = None,
region: str = None,
secret_key: str = None,
security_token: str = None,
shared_credentials_file: str = None,
sts_endpoint: str = None,
tablestore_endpoint: str = None,
tablestore_table: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.OssBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.OssBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.OssBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
PgBackend
Initializers
import cdktf
cdktf.PgBackend(
scope: Construct,
conn_str: str,
schema_name: str = None,
skip_index_creation: bool = None,
skip_schema_creation: bool = None,
skip_table_creation: bool = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.PgBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.PgBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.PgBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
RemoteBackend
Initializers
import cdktf
cdktf.RemoteBackend(
scope: Construct,
organization: str,
workspaces: IRemoteWorkspace,
hostname: str = None,
token: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.RemoteBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.RemoteBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.RemoteBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Resource
- Implements: IResource
A construct which represents a resource.
Initializers
import cdktf
cdktf.Resource(
scope: Construct,
id: str
)
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
def to_string() - > str
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_construct
is_construct
import cdktf
cdktf.Resource.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
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.
node: Node
- Type: constructs.Node
The tree node.
stack
Required
stack
- Deprecated: - Please use Construct from the constructs package instead.
stack: TerraformStack
- Type: TerraformStack
The stack in which this resource is defined.
S3Backend
Initializers
import cdktf
cdktf.S3Backend(
scope: Construct,
bucket: str,
key: str,
access_key: str = None,
acl: str = None,
allowed_account_ids: str = None,
assume_role: S3BackendAssumeRoleConfig = None,
assume_role_policy: str = None,
assume_role_policy_arns: typing.List[str] = None,
assume_role_tags: typing.Mapping[str] = None,
assume_role_transitive_tag_keys: typing.List[str] = None,
assume_role_with_web_identity: S3BackendAssumeRoleWithWebIdentityConfig = None,
custom_ca_bundle: str = None,
dynamodb_endpoint: str = None,
dynamodb_table: str = None,
ec2_metadata_service_endpoint: str = None,
ec2_metadata_service_endpoint_mode: str = None,
encrypt: bool = None,
endpoint: str = None,
endpoints: S3BackendEndpointConfig = None,
external_id: str = None,
forbidden_account_ids: str = None,
force_path_style: bool = None,
http_proxy: str = None,
https_proxy: str = None,
iam_endpoint: str = None,
insecure: bool = None,
kms_key_id: str = None,
max_retries: typing.Union[int, float] = None,
no_proxy: str = None,
profile: str = None,
region: str = None,
retry_mode: str = None,
role_arn: str = None,
secret_key: str = None,
session_name: str = None,
shared_config_files: typing.List[str] = None,
shared_credentials_file: str = None,
shared_credentials_files: typing.List[str] = None,
skip_credentials_validation: bool = None,
skip_metadata_api_check: bool = None,
skip_region_validation: bool = None,
skip_requesting_account_id: bool = None,
skip_s3_checksum: bool = None,
sse_customer_key: str = None,
sts_endpoint: str = None,
sts_region: str = None,
token: str = None,
use_legacy_workflow: bool = None,
use_path_style: bool = None,
workspace_key_prefix: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.S3Backend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.S3Backend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.S3Backend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
SwiftBackend
Initializers
import cdktf
cdktf.SwiftBackend(
scope: Construct,
container: str,
application_credential_id: str = None,
application_credential_name: str = None,
application_credential_secret: str = None,
archive_container: str = None,
auth_url: str = None,
cacert_file: str = None,
cert: str = None,
cloud: str = None,
default_domain: str = None,
domain_id: str = None,
domain_name: str = None,
expire_after: str = None,
insecure: bool = None,
key: str = None,
password: str = None,
project_domain_id: str = None,
project_domain_name: str = None,
region_name: str = None,
state_name: str = None,
tenant_id: str = None,
tenant_name: str = None,
token: str = None,
user_domain_id: str = None,
user_domain_name: str = None,
user_id: str = None,
user_name: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
to_metadata
def to_metadata() - > typing.Any
to_terraform
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
_fromstack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.SwiftBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
is_terraform_element
import cdktf
cdktf.SwiftBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
is_backend
import cdktf
cdktf.SwiftBackend.is_backend(
x: typing.Any
)
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.
node: Node
- 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.
cdktf_stack: TerraformStack
- 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.
fqn: str
- 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.
friendly_unique_id: str
- Type: str
TerraformAsset
Initializers
import cdktf
cdktf.TerraformAsset(
scope: Construct,
id: str,
path: str,
asset_hash: str = None,
type: AssetType = None
)
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
def to_string() - > str
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_construct
import cdktf
cdktf.TerraformAsset.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
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
node: Node
- Type: constructs.Node
The tree node.
file_name
Required
file_name: str
- Type: str
Name of the asset.
path
Required
path: str
- 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
asset_hash: str
- Type: str
type
Required
type: AssetType
- Type: AssetType
TerraformBackend
Initializers
import cdktf
cdktf.TerraformBackend(
scope: Construct,
id: str,
name: str
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_remote_state_data_source
def get_remote_state_data_source(
scope: Construct,
name: str,
from_stack: str
) - > TerraformRemoteState
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
import cdktf
cdktf.TerraformBackend.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformBackend.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_backend
import cdktf
cdktf.TerraformBackend.is_backend(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
TerraformDataSource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
import cdktf
cdktf.TerraformDataSource(
scope: Construct,
id: str,
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
count: typing.Union[typing.Union[int, float], TerraformCount] = None,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
lifecycle: TerraformResourceLifecycle = None,
provider: TerraformProvider = None,
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] = None,
terraform_resource_type: str,
terraform_generator_metadata: TerraformProviderGeneratorMetadata = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get_any_map_attribute
def get_any_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Any]
terraform_attribute
Required
- Type: str
get_boolean_attribute
def get_boolean_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
def get_boolean_map_attribute(
terraform_attribute: str
) - > typing.Mapping[bool]
terraform_attribute
Required
- Type: str
get_list_attribute
def get_list_attribute(
terraform_attribute: str
) - > typing.List[str]
terraform_attribute
Required
- Type: str
get_number_attribute
def get_number_attribute(
terraform_attribute: str
) - > typing.Union[int, float]
terraform_attribute
Required
- Type: str
get_number_list_attribute
def get_number_list_attribute(
terraform_attribute: str
) - > typing.List[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_number_map_attribute
def get_number_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_string_attribute
def get_string_attribute(
terraform_attribute: str
) - > str
terraform_attribute
Required
- Type: str
get_string_map_attribute
def get_string_map_attribute(
terraform_attribute: str
) - > typing.Mapping[str]
terraform_attribute
Required
- Type: str
interpolation_for_attribute
def interpolation_for_attribute(
terraform_attribute: str
) - > IResolvable
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
import cdktf
cdktf.TerraformDataSource.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformDataSource.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_terraform_data_source
import cdktf
cdktf.TerraformDataSource.is_terraform_data_source(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
terraform_meta_arguments
Required
terraform_meta_arguments: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
terraform_resource_type: str
- Type: str
terraform_generator_metadata
Optional
terraform_generator_metadata: TerraformProviderGeneratorMetadata
count
Optional
count: typing.Union[typing.Union[int, float], TerraformCount]
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
depends_on: typing.List[str]
- Type: typing.List[str]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
lifecycle
Optional
lifecycle: TerraformResourceLifecycle
provider
Optional
provider: TerraformProvider
- Type: TerraformProvider
TerraformElement
Initializers
import cdktf
cdktf.TerraformElement(
scope: Construct,
id: str,
element_type: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.TerraformElement.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformElement.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
TerraformHclModule
Initializers
import cdktf
cdktf.TerraformHclModule(
scope: Construct,
id: str,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None,
skip_asset_creation_from_local_modules: bool = None,
source: str,
version: str = None,
variables: typing.Mapping[typing.Any] = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
add_provider
def add_provider(
provider: typing.Union[TerraformProvider, TerraformModuleProvider]
) - > None
provider
Required
- Type: typing.Union[TerraformProvider, TerraformModuleProvider]
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
interpolation_for_output
def interpolation_for_output(
module_output: str
) - > IResolvable
module_output
Required
- Type: str
get
def get(
output: str
) - > typing.Any
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
set
def set(
variable: str,
value: typing.Any
) - > None
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
import cdktf
cdktf.TerraformHclModule.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformHclModule.is_terraform_element(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
source
Required
source: str
- Type: str
providers
Optional
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
skip_asset_creation_from_local_modules: bool
- Type: bool
version
Optional
version: str
- Type: str
depends_on
Optional
depends_on: typing.List[str]
- Type: typing.List[str]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
variables
Optional
variables: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
TerraformLocal
- Implements: ITerraformAddressable
Initializers
import cdktf
cdktf.TerraformLocal(
scope: Construct,
id: str,
expression: typing.Any
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.TerraformLocal.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformLocal.is_terraform_element(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
as_any_map
Required
as_any_map: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
as_boolean
Required
as_boolean: IResolvable
- Type: IResolvable
as_boolean_map
Required
as_boolean_map: typing.Mapping[bool]
- Type: typing.Mapping[bool]
as_list
Required
as_list: typing.List[str]
- Type: typing.List[str]
as_number
Required
as_number: typing.Union[int, float]
- Type: typing.Union[int, float]
as_number_map
Required
as_number_map: typing.Mapping[typing.Union[int, float]]
- Type: typing.Mapping[typing.Union[int, float]]
as_string
Required
as_string: str
- Type: str
as_string_map
Required
as_string_map: typing.Mapping[str]
- Type: typing.Mapping[str]
expression
Required
expression: typing.Any
- Type: typing.Any
TerraformModule
- Implements: ITerraformDependable
TerraformModule can be used to reference a local terraform module or a module from the Terraform Registry.
It should be used if you can not use generated bindings for the module as you would get by adding the module to your cdktf.json files "terraformModules" array and running cdktf get.
This class is not creating a Terraform module to be used outside of CDKTF. If you want to bundle certain resources together like you would do with a Terraform module, you should use Constructs instead, see http://cdk.tf/constructs for more details.
Initializers
import cdktf
cdktf.TerraformModule(
scope: Construct,
id: str,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None,
skip_asset_creation_from_local_modules: bool = None,
source: str,
version: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
add_provider
def add_provider(
provider: typing.Union[TerraformProvider, TerraformModuleProvider]
) - > None
provider
Required
- Type: typing.Union[TerraformProvider, TerraformModuleProvider]
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
interpolation_for_output
def interpolation_for_output(
module_output: str
) - > IResolvable
module_output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.TerraformModule.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformModule.is_terraform_element(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
source
Required
source: str
- Type: str
providers
Optional
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
skip_asset_creation_from_local_modules: bool
- Type: bool
version
Optional
version: str
- Type: str
depends_on
Optional
depends_on: typing.List[str]
- Type: typing.List[str]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
TerraformOutput
Initializers
import cdktf
cdktf.TerraformOutput(
scope: Construct,
id: str,
value: typing.Any,
depends_on: typing.List[ITerraformDependable] = None,
description: str = None,
precondition: Precondition = None,
sensitive: bool = None,
static_id: bool = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_terraform_output | No description. |
is_construct
import cdktf
cdktf.TerraformOutput.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformOutput.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_terraform_output
import cdktf
cdktf.TerraformOutput.is_terraform_output(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
static_id
Required
static_id: bool
- Type: bool
value
Required
value: typing.Any
- Type: typing.Any
depends_on
Optional
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
description
Optional
description: str
- Type: str
precondition
Optional
precondition: Precondition
- Type: Precondition
sensitive
Optional
sensitive: bool
- Type: bool
TerraformProvider
Initializers
import cdktf
cdktf.TerraformProvider(
scope: Construct,
id: str,
terraform_resource_type: str,
terraform_generator_metadata: TerraformProviderGeneratorMetadata = None,
terraform_provider_source: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
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
import cdktf
cdktf.TerraformProvider.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformProvider.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_terraform_provider
import cdktf
cdktf.TerraformProvider.is_terraform_provider(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
meta_attributes
Required
meta_attributes: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
terraform_resource_type: str
- Type: str
terraform_generator_metadata
Optional
terraform_generator_metadata: TerraformProviderGeneratorMetadata
terraform_provider_source
Optional
terraform_provider_source: str
- Type: str
alias
Optional
alias: str
- Type: str
TerraformRemoteState
- Implements: ITerraformAddressable
Initializers
import cdktf
cdktf.TerraformRemoteState(
scope: Construct,
id: str,
backend: str,
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
get
def get(
output: str
) - > IResolvable
output
Required
- Type: str
get_boolean
def get_boolean(
output: str
) - > IResolvable
output
Required
- Type: str
get_list
def get_list(
output: str
) - > typing.List[str]
output
Required
- Type: str
get_number
def get_number(
output: str
) - > typing.Union[int, float]
output
Required
- Type: str
get_string
def get_string(
output: str
) - > str
output
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.TerraformRemoteState.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformRemoteState.is_terraform_element(
x: typing.Any
)
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: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
tfResourceType | str | No description. |
tfResourceType
Required
tfResourceType: str
- Type: str
TerraformResource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
import cdktf
cdktf.TerraformResource(
scope: Construct,
id: str,
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
count: typing.Union[typing.Union[int, float], TerraformCount] = None,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
lifecycle: TerraformResourceLifecycle = None,
provider: TerraformProvider = None,
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] = None,
terraform_resource_type: str,
terraform_generator_metadata: TerraformProviderGeneratorMetadata = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
Adds this resource to the terraform JSON output.
add_move_target
def add_move_target(
move_target: str
) - > None
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
def get_any_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Any]
terraform_attribute
Required
- Type: str
get_boolean_attribute
def get_boolean_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
def get_boolean_map_attribute(
terraform_attribute: str
) - > typing.Mapping[bool]
terraform_attribute
Required
- Type: str
get_list_attribute
def get_list_attribute(
terraform_attribute: str
) - > typing.List[str]
terraform_attribute
Required
- Type: str
get_number_attribute
def get_number_attribute(
terraform_attribute: str
) - > typing.Union[int, float]
terraform_attribute
Required
- Type: str
get_number_list_attribute
def get_number_list_attribute(
terraform_attribute: str
) - > typing.List[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_number_map_attribute
def get_number_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_string_attribute
def get_string_attribute(
terraform_attribute: str
) - > str
terraform_attribute
Required
- Type: str
get_string_map_attribute
def get_string_map_attribute(
terraform_attribute: str
) - > typing.Mapping[str]
terraform_attribute
Required
- Type: str
has_resource_move
def has_resource_move() - > typing.Union[TerraformResourceMoveByTarget, TerraformResourceMoveById]
import_from
def import_from(
id: str,
provider: TerraformProvider = None
) - > None
id
Required
- Type: str
provider
Optional
- Type: TerraformProvider
interpolation_for_attribute
def interpolation_for_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
move_from_id
def move_from_id(
id: str
) - > None
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
def move_to(
move_target: str,
index: typing.Union[str, typing.Union[int, float]] = None
) - > None
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
def move_to_id(
id: str
) - > None
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
import cdktf
cdktf.TerraformResource.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformResource.is_terraform_element(
x: typing.Any
)
x
Required
- Type: typing.Any
is_terraform_resource
import cdktf
cdktf.TerraformResource.is_terraform_resource(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
terraform_meta_arguments
Required
terraform_meta_arguments: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
terraform_resource_type
Required
terraform_resource_type: str
- Type: str
terraform_generator_metadata
Optional
terraform_generator_metadata: TerraformProviderGeneratorMetadata
connection
Optional
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
count: typing.Union[typing.Union[int, float], TerraformCount]
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
depends_on: typing.List[str]
- Type: typing.List[str]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
lifecycle
Optional
lifecycle: TerraformResourceLifecycle
provider
Optional
provider: TerraformProvider
- Type: TerraformProvider
provisioners
Optional
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
TerraformStack
Initializers
import cdktf
cdktf.TerraformStack(
scope: Construct,
id: str
)
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
def to_string() - > str
Returns a string representation of this construct.
add_dependency
def add_dependency(
dependency: TerraformStack
) - > None
dependency
Required
- Type: TerraformStack
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
all_providers
def all_providers() - > typing.List[TerraformProvider]
depends_on
def depends_on(
stack: TerraformStack
) - > bool
stack
Required
- Type: TerraformStack
ensure_backend_exists
def ensure_backend_exists() - > TerraformBackend
get_logical_id
def get_logical_id(
tf_element: typing.Union[Node, TerraformElement]
) - > str
tf_element
Required
- Type: typing.Union[constructs.Node, TerraformElement]
has_resource_move
def has_resource_move() - > bool
prepare_stack
def prepare_stack() - > None
register_incoming_cross_stack_reference
def register_incoming_cross_stack_reference(
from_stack: TerraformStack
) - > TerraformRemoteState
from_stack
Required
- Type: TerraformStack
register_outgoing_cross_stack_reference
def register_outgoing_cross_stack_reference(
identifier: str
) - > TerraformOutput
identifier
Required
- Type: str
run_all_validations
def run_all_validations() - > None
Run all validations on the stack.
to_hcl_terraform
def to_hcl_terraform() - > typing.Mapping[typing.Any]
to_terraform
def to_terraform() - > typing.Any
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_stack | No description. |
of | No description. |
is_construct
import cdktf
cdktf.TerraformStack.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_stack
import cdktf
cdktf.TerraformStack.is_stack(
x: typing.Any
)
x
Required
- Type: typing.Any
of
import cdktf
cdktf.TerraformStack.of(
construct: IConstruct
)
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
node: Node
- Type: constructs.Node
The tree node.
dependencies
Required
dependencies: typing.List[TerraformStack]
- Type: typing.List[TerraformStack]
move_targets
Required
move_targets: TerraformResourceTargets
- Type: TerraformResourceTargets
synthesizer
Required
synthesizer: IStackSynthesizer
- Type: IStackSynthesizer
TerraformVariable
- Implements: ITerraformAddressable
Initializers
import cdktf
cdktf.TerraformVariable(
scope: Construct,
id: str,
default: typing.Any = None,
description: str = None,
nullable: bool = None,
sensitive: bool = None,
type: str = None,
validation: typing.List[TerraformVariableValidationConfig] = None
)
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
def to_string() - > str
Returns a string representation of this construct.
add_override
def add_override(
path: str,
value: typing.Any
) - > None
path
Required
- Type: str
value
Required
- Type: typing.Any
override_logical_id
def override_logical_id(
new_logical_id: str
) - > None
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
def reset_override_logical_id() - > None
Resets a previously passed logical Id to use the auto-generated logical id again.
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
to_metadata
def to_metadata() - > typing.Any
to_terraform
def to_terraform() - > typing.Any
add_validation
def add_validation(
condition: typing.Any,
error_message: str
) - > None
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
def synthesize_attributes() - > typing.Mapping[typing.Any]
synthesize_hcl_attributes
def synthesize_hcl_attributes() - > typing.Mapping[typing.Any]
Static Functions
Name | Description |
---|---|
is_construct | Checks if x is a construct. |
is_terraform_element | No description. |
is_construct
import cdktf
cdktf.TerraformVariable.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_terraform_element
import cdktf
cdktf.TerraformVariable.is_terraform_element(
x: typing.Any
)
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
node: Node
- Type: constructs.Node
The tree node.
cdktf_stack
Required
cdktf_stack: TerraformStack
- Type: TerraformStack
fqn
Required
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
boolean_value
Required
boolean_value: IResolvable
- Type: IResolvable
list_value
Required
list_value: typing.List[str]
- Type: typing.List[str]
number_value
Required
number_value: typing.Union[int, float]
- Type: typing.Union[int, float]
string_value
Required
string_value: str
- Type: str
value
Required
value: typing.Any
- Type: typing.Any
default
Optional
default: typing.Any
- Type: typing.Any
description
Optional
description: str
- Type: str
nullable
Optional
nullable: bool
- Type: bool
sensitive
Optional
sensitive: bool
- Type: bool
type
Optional
type: str
- Type: str
validation
Optional
validation: typing.List[TerraformVariableValidationConfig]
- Type: typing.List[TerraformVariableValidationConfig]
Structs
AppConfig
Initializer
import cdktf
cdktf.AppConfig(
context: typing.Mapping[typing.Any] = None,
hcl_output: bool = None,
outdir: str = None,
skip_backend_validation: bool = None,
skip_validation: bool = None,
stack_traces: bool = None
)
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
context: typing.Mapping[typing.Any]
- 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
hcl_output: bool
- Type: bool
outdir
Optional
outdir: str
- 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
skip_backend_validation: bool
- Type: bool
- Default: false
Whether to skip backend validation during synthesis of the app.
skip_validation
Optional
skip_validation: bool
- Type: bool
- Default: false
Whether to skip all validations during synthesis of the app.
stack_traces
Optional
stack_traces: bool
- 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
import cdktf
cdktf.AzurermBackendConfig(
container_name: str,
key: str,
storage_account_name: str,
access_key: str = None,
client_certificate_password: str = None,
client_certificate_path: str = None,
client_id: str = None,
client_secret: str = None,
endpoint: str = None,
environment: str = None,
metadata_host: str = None,
msi_endpoint: str = None,
oidc_request_token: str = None,
oidc_request_url: str = None,
oidc_token: str = None,
oidc_token_file_path: str = None,
resource_group_name: str = None,
sas_token: str = None,
snapshot: bool = None,
subscription_id: str = None,
tenant_id: str = None,
use_azuread_auth: bool = None,
use_microsoft_graph: bool = None,
use_msi: bool = None,
use_oidc: bool = None
)
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
container_name: str
- Type: str
(Required) The Name of the Storage Container within the Storage Account.
key
Required
key: str
- Type: str
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storage_account_name
Required
storage_account_name: str
- Type: str
(Required) The Name of the Storage Account.
access_key
Optional
access_key: str
- 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
client_certificate_password: str
- 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
client_certificate_path: str
- 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
client_id: str
- 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
client_secret: str
- Type: str
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
endpoint: str
- 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
environment: str
- 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
metadata_host: str
- 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
msi_endpoint: str
- 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
oidc_request_token: str
- 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
oidc_request_url: str
- 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
oidc_token: str
- 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
oidc_token_file_path: str
- 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
resource_group_name: str
- Type: str
(Required) The Name of the Resource Group in which the Storage Account exists.
sas_token
Optional
sas_token: str
- 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
snapshot: bool
- 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
subscription_id: str
- 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
tenant_id: str
- 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
use_azuread_auth: bool
- 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
use_microsoft_graph: bool
- 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
use_msi: bool
- 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
use_oidc: bool
- 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
import cdktf
cdktf.CloudBackendConfig(
organization: str,
workspaces: typing.Union[NamedCloudWorkspace, TaggedCloudWorkspaces],
hostname: str = None,
token: str = None
)
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
organization: str
- Type: str
The name of the organization containing the workspace(s) the current configuration should use.
workspaces
Required
workspaces: typing.Union[NamedCloudWorkspace, TaggedCloudWorkspaces]
- 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
hostname: str
- Type: str
- Default: app.terraform.io
The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.
token
Optional
token: str
- 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
import cdktf
cdktf.ConsulBackendConfig(
access_token: str,
path: str,
address: str = None,
ca_file: str = None,
cert_file: str = None,
datacenter: str = None,
gzip: bool = None,
http_auth: str = None,
key_file: str = None,
lock: bool = None,
scheme: str = None
)
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
access_token: str
- Type: str
(Required) Access token.
path
Required
path: str
- Type: str
(Required) Path in the Consul KV store.
address
Optional
address: str
- 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
ca_file: str
- Type: str
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
cert_file
Optional
cert_file: str
- Type: str
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenter
Optional
datacenter: str
- Type: str
(Optional) The datacenter to use.
Defaults to that of the agent.
gzip
Optional
gzip: bool
- Type: bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
http_auth
Optional
http_auth: str
- 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
key_file: str
- Type: str
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lock
Optional
lock: bool
- 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
scheme: str
- 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
import cdktf
cdktf.CosBackendAssumeRole(
role_arn: str,
session_duration: typing.Union[int, float],
session_name: str,
policy: typing.Any = None
)
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
role_arn: str
- Type: str
(Required) The ARN of the role to assume.
It can be sourced from the TENCENTCLOUD_ASSUME_ROLE_ARN.
session_duration
Required
session_duration: typing.Union[int, float]
- 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
session_name: str
- 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
policy: typing.Any
- 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
import cdktf
cdktf.CosBackendConfig(
bucket: str,
accelerate: bool = None,
acl: str = None,
assume_role: CosBackendAssumeRole = None,
domain: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
region: str = None,
secret_id: str = None,
secret_key: str = None,
security_token: str = None
)
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
bucket: str
- Type: str
(Required) The name of the COS bucket.
You shall manually create it first.
accelerate
Optional
accelerate: bool
- Type: bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
acl: str
- Type: str
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assume_role
Optional
assume_role: CosBackendAssumeRole
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
domain: str
- Type: str
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encrypt
Optional
encrypt: bool
- 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
endpoint: str
- Type: str
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
key
Optional
key: str
- Type: str
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefix
Optional
prefix: str
- Type: str
(Optional) The directory for saving the state file in bucket.
Default to "env:".
region
Optional
region: str
- Type: str
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secret_id
Optional
secret_id: str
- Type: str
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secret_key
Optional
secret_key: str
- Type: str
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
security_token
Optional
security_token: str
- Type: str
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
DataConfig
Initializer
import cdktf
cdktf.DataConfig(
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
count: typing.Union[typing.Union[int, float], TerraformCount] = None,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
lifecycle: TerraformResourceLifecycle = None,
provider: TerraformProvider = None,
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] = None,
input: typing.Mapping[typing.Any] = None,
triggers_replace: typing.Mapping[typing.Any] = None
)
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
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
count: typing.Union[typing.Union[int, float], TerraformCount]
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
lifecycle
Optional
lifecycle: TerraformResourceLifecycle
provider
Optional
provider: TerraformProvider
- Type: TerraformProvider
provisioners
Optional
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
input
Optional
input: typing.Mapping[typing.Any]
- 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
triggers_replace: typing.Mapping[typing.Any]
- 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
import cdktf
cdktf.DataTerraformRemoteStateAzurermConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
container_name: str,
key: str,
storage_account_name: str,
access_key: str = None,
client_certificate_password: str = None,
client_certificate_path: str = None,
client_id: str = None,
client_secret: str = None,
endpoint: str = None,
environment: str = None,
metadata_host: str = None,
msi_endpoint: str = None,
oidc_request_token: str = None,
oidc_request_url: str = None,
oidc_token: str = None,
oidc_token_file_path: str = None,
resource_group_name: str = None,
sas_token: str = None,
snapshot: bool = None,
subscription_id: str = None,
tenant_id: str = None,
use_azuread_auth: bool = None,
use_microsoft_graph: bool = None,
use_msi: bool = None,
use_oidc: bool = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
container_name
Required
container_name: str
- Type: str
(Required) The Name of the Storage Container within the Storage Account.
key
Required
key: str
- Type: str
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storage_account_name
Required
storage_account_name: str
- Type: str
(Required) The Name of the Storage Account.
access_key
Optional
access_key: str
- 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
client_certificate_password: str
- 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
client_certificate_path: str
- 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
client_id: str
- 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
client_secret: str
- Type: str
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
endpoint: str
- 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
environment: str
- 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
metadata_host: str
- 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
msi_endpoint: str
- 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
oidc_request_token: str
- 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
oidc_request_url: str
- 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
oidc_token: str
- 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
oidc_token_file_path: str
- 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
resource_group_name: str
- Type: str
(Required) The Name of the Resource Group in which the Storage Account exists.
sas_token
Optional
sas_token: str
- 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
snapshot: bool
- 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
subscription_id: str
- 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
tenant_id: str
- 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
use_azuread_auth: bool
- 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
use_microsoft_graph: bool
- 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
use_msi: bool
- 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
use_oidc: bool
- 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
import cdktf
cdktf.DataTerraformRemoteStateConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None
)
Properties
defaults
Optional
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
DataTerraformRemoteStateConsulConfig
Initializer
import cdktf
cdktf.DataTerraformRemoteStateConsulConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
access_token: str,
path: str,
address: str = None,
ca_file: str = None,
cert_file: str = None,
datacenter: str = None,
gzip: bool = None,
http_auth: str = None,
key_file: str = None,
lock: bool = None,
scheme: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
access_token
Required
access_token: str
- Type: str
(Required) Access token.
path
Required
path: str
- Type: str
(Required) Path in the Consul KV store.
address
Optional
address: str
- 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
ca_file: str
- Type: str
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
cert_file
Optional
cert_file: str
- Type: str
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenter
Optional
datacenter: str
- Type: str
(Optional) The datacenter to use.
Defaults to that of the agent.
gzip
Optional
gzip: bool
- Type: bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
http_auth
Optional
http_auth: str
- 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
key_file: str
- Type: str
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lock
Optional
lock: bool
- 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
scheme: str
- 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
import cdktf
cdktf.DataTerraformRemoteStateCosConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
accelerate: bool = None,
acl: str = None,
assume_role: CosBackendAssumeRole = None,
domain: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
region: str = None,
secret_id: str = None,
secret_key: str = None,
security_token: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
bucket
Required
bucket: str
- Type: str
(Required) The name of the COS bucket.
You shall manually create it first.
accelerate
Optional
accelerate: bool
- Type: bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
acl: str
- Type: str
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assume_role
Optional
assume_role: CosBackendAssumeRole
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
domain: str
- Type: str
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encrypt
Optional
encrypt: bool
- 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
endpoint: str
- Type: str
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
key
Optional
key: str
- Type: str
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefix
Optional
prefix: str
- Type: str
(Optional) The directory for saving the state file in bucket.
Default to "env:".
region
Optional
region: str
- Type: str
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secret_id
Optional
secret_id: str
- Type: str
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secret_key
Optional
secret_key: str
- Type: str
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
security_token
Optional
security_token: str
- Type: str
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
DataTerraformRemoteStateGcsConfig
Initializer
import cdktf
cdktf.DataTerraformRemoteStateGcsConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
access_token: str = None,
credentials: str = None,
encryption_key: str = None,
impersonate_service_account: str = None,
impersonate_service_account_delegates: typing.List[str] = None,
kms_encryption_key: str = None,
prefix: str = None,
storeage_custom_endpoint: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
bucket
Required
bucket: str
- Type: str
(Required) The name of the GCS bucket.
This name must be globally unique.
access_token
Optional
access_token: str
- 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
credentials: str
- 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
encryption_key: str
- Type: str
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonate_service_account
Optional
impersonate_service_account: str
- 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
impersonate_service_account_delegates: typing.List[str]
- Type: typing.List[str]
(Optional) The delegation chain for an impersonating a service account.
kms_encryption_key
Optional
kms_encryption_key: str
- 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
prefix: str
- 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
storeage_custom_endpoint: str
- 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
import cdktf
cdktf.DataTerraformRemoteStateHttpConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
address: str,
client_ca_certificate_pem: str = None,
client_certificate_pem: str = None,
client_private_key_pem: str = None,
lock_address: str = None,
lock_method: str = None,
password: str = None,
retry_max: typing.Union[int, float] = None,
retry_wait_max: typing.Union[int, float] = None,
retry_wait_min: typing.Union[int, float] = None,
skip_cert_verification: bool = None,
unlock_address: str = None,
unlock_method: str = None,
update_method: str = None,
username: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
address
Required
address: str
- Type: str
(Required) The address of the REST endpoint.
client_ca_certificate_pem
Optional
client_ca_certificate_pem: str
- Type: str
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
client_certificate_pem
Optional
client_certificate_pem: str
- 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
client_private_key_pem: str
- Type: str
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lock_address
Optional
lock_address: str
- Type: str
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lock_method
Optional
lock_method: str
- Type: str
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
password: str
- Type: str
(Optional) The password for HTTP basic authentication.
retry_max
Optional
retry_max: typing.Union[int, float]
- Type: typing.Union[int, float]
(Optional) The number of HTTP request retries.
Defaults to 2.
retry_wait_max
Optional
retry_wait_max: typing.Union[int, float]
- Type: typing.Union[int, float]
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retry_wait_min
Optional
retry_wait_min: typing.Union[int, float]
- Type: typing.Union[int, float]
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skip_cert_verification
Optional
skip_cert_verification: bool
- Type: bool
(Optional) Whether to skip TLS verification.
Defaults to false.
unlock_address
Optional
unlock_address: str
- Type: str
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlock_method
Optional
unlock_method: str
- Type: str
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
update_method
Optional
update_method: str
- Type: str
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
username: str
- Type: str
(Optional) The username for HTTP basic authentication.
DataTerraformRemoteStateLocalConfig
Initializer
import cdktf
cdktf.DataTerraformRemoteStateLocalConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
path: str = None,
workspace_dir: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
path
Optional
path: str
- Type: str
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspace_dir
Optional
workspace_dir: str
- Type: str
(Optional) The path to non-default workspaces.
DataTerraformRemoteStateOssConfig
Initializer
import cdktf
cdktf.DataTerraformRemoteStateOssConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
access_key: str = None,
acl: str = None,
assume_role: OssAssumeRole = None,
assume_role_policy: str = None,
assume_role_role_arn: str = None,
assume_role_session_expiration: typing.Union[int, float] = None,
assume_role_session_name: str = None,
ecs_role_name: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
profile: str = None,
region: str = None,
secret_key: str = None,
security_token: str = None,
shared_credentials_file: str = None,
sts_endpoint: str = None,
tablestore_endpoint: str = None,
tablestore_table: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
bucket
Required
bucket: str
- Type: str
(Required) The name of the OSS bucket.
access_key
Optional
access_key: str
- Type: str
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
acl: str
- Type: str
(Optional) Object ACL to be applied to the state file.
assume_role
Optional
assume_role
- Deprecated: Use flattened assume role options
assume_role: OssAssumeRole
- Type: OssAssumeRole
assume_role_policy
Optional
assume_role_policy: str
- 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
assume_role_role_arn: str
- 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
assume_role_session_expiration: typing.Union[int, float]
- 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
assume_role_session_name: str
- 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
ecs_role_name: str
- 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
encrypt: bool
- 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
endpoint: str
- Type: str
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
key: str
- Type: str
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
prefix: str
- Type: str
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
profile: str
- 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
region: str
- Type: str
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secret_key
Optional
secret_key: str
- Type: str
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
security_token
Optional
security_token: str
- Type: str
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
shared_credentials_file
Optional
shared_credentials_file: str
- 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
sts_endpoint: str
- 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
tablestore_endpoint: str
- Type: str
(Optional) A custom endpoint for the TableStore API.
tablestore_table
Optional
tablestore_table: str
- 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
import cdktf
cdktf.DataTerraformRemoteStatePgConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
conn_str: str,
schema_name: str = None,
skip_index_creation: bool = None,
skip_schema_creation: bool = None,
skip_table_creation: bool = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
conn_str
Required
conn_str: str
- 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
schema_name: str
- 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
skip_index_creation: bool
- 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
skip_schema_creation: bool
- 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
skip_table_creation: bool
- 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
import cdktf
cdktf.DataTerraformRemoteStateRemoteConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
organization: str,
workspaces: IRemoteWorkspace,
hostname: str = None,
token: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
organization
Required
organization: str
- Type: str
workspaces
Required
workspaces: IRemoteWorkspace
- Type: IRemoteWorkspace
hostname
Optional
hostname: str
- Type: str
token
Optional
token: str
- Type: str
DataTerraformRemoteStateS3Config
Initializer
import cdktf
cdktf.DataTerraformRemoteStateS3Config(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
bucket: str,
key: str,
access_key: str = None,
acl: str = None,
allowed_account_ids: str = None,
assume_role: S3BackendAssumeRoleConfig = None,
assume_role_policy: str = None,
assume_role_policy_arns: typing.List[str] = None,
assume_role_tags: typing.Mapping[str] = None,
assume_role_transitive_tag_keys: typing.List[str] = None,
assume_role_with_web_identity: S3BackendAssumeRoleWithWebIdentityConfig = None,
custom_ca_bundle: str = None,
dynamodb_endpoint: str = None,
dynamodb_table: str = None,
ec2_metadata_service_endpoint: str = None,
ec2_metadata_service_endpoint_mode: str = None,
encrypt: bool = None,
endpoint: str = None,
endpoints: S3BackendEndpointConfig = None,
external_id: str = None,
forbidden_account_ids: str = None,
force_path_style: bool = None,
http_proxy: str = None,
https_proxy: str = None,
iam_endpoint: str = None,
insecure: bool = None,
kms_key_id: str = None,
max_retries: typing.Union[int, float] = None,
no_proxy: str = None,
profile: str = None,
region: str = None,
retry_mode: str = None,
role_arn: str = None,
secret_key: str = None,
session_name: str = None,
shared_config_files: typing.List[str] = None,
shared_credentials_file: str = None,
shared_credentials_files: typing.List[str] = None,
skip_credentials_validation: bool = None,
skip_metadata_api_check: bool = None,
skip_region_validation: bool = None,
skip_requesting_account_id: bool = None,
skip_s3_checksum: bool = None,
sse_customer_key: str = None,
sts_endpoint: str = None,
sts_region: str = None,
token: str = None,
use_legacy_workflow: bool = None,
use_path_style: bool = None,
workspace_key_prefix: str = None
)
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
defaults: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
workspace
Optional
workspace: str
- Type: str
bucket
Required
bucket: str
- Type: str
Name of the S3 Bucket.
key
Required
key: str
- 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
access_key: str
- 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
acl: str
- Type: str
(Optional) Canned ACL to be applied to the state file.
allowed_account_ids
Optional
allowed_account_ids: str
- 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
assume_role: S3BackendAssumeRoleConfig
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.
assume_role_policy: str
- 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.
assume_role_policy_arns: typing.List[str]
- 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.
assume_role_tags: typing.Mapping[str]
- 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.
assume_role_transitive_tag_keys: typing.List[str]
- 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: S3BackendAssumeRoleWithWebIdentityConfig
Assume Role With Web Identity Configuration.
custom_ca_bundle
Optional
custom_ca_bundle: str
- 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
dynamodb_endpoint: str
- 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
dynamodb_table: str
- 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
ec2_metadata_service_endpoint: str
- 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
ec2_metadata_service_endpoint_mode: str
- 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
encrypt: bool
- Type: bool
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
- Deprecated: Use endpoints.s3 instead
endpoint: str
- Type: str
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
endpoints: S3BackendEndpointConfig
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
external_id
Optional
external_id
- Deprecated: Use assume_role.external_id instead.
external_id: str
- Type: str
(Optional) External identifier to use when assuming the role.
forbidden_account_ids
Optional
forbidden_account_ids: str
- 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
force_path_style: bool
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
http_proxy
Optional
http_proxy: str
- 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
https_proxy: str
- 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
iam_endpoint: str
- 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
insecure: bool
- 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
kms_key_id: str
- 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
max_retries: typing.Union[int, float]
- 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
no_proxy: str
- 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
profile: str
- 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
region: str
- 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
retry_mode: str
- 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.
role_arn: str
- Type: str
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secret_key
Optional
secret_key: str
- 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.
session_name: str
- Type: str
(Optional) Session name to use when assuming the role.
shared_config_files
Optional
shared_config_files: typing.List[str]
- Type: typing.List[str]
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
shared_credentials_file
Optional
shared_credentials_file: str
- Type: str
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
shared_credentials_files
Optional
shared_credentials_files: typing.List[str]
- Type: typing.List[str]
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skip_credentials_validation
Optional
skip_credentials_validation: bool
- Type: bool
(Optional) Skip credentials validation via the STS API.
skip_metadata_api_check
Optional
skip_metadata_api_check: bool
- Type: bool
(Optional) Skip usage of EC2 Metadata API.
skip_region_validation
Optional
skip_region_validation: bool
- Type: bool
(Optional) Skip validation of provided region name.
skip_requesting_account_id
Optional
skip_requesting_account_id: bool
- 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
skip_s3_checksum: bool
- Type: bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sse_customer_key
Optional
sse_customer_key: str
- 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
sts_endpoint: str
- 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
sts_region: str
- Type: str
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
token: str
- Type: str
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
use_legacy_workflow
Optional
use_legacy_workflow: bool
- 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
use_path_style: bool
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspace_key_prefix
Optional
workspace_key_prefix: str
- 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
import cdktf
cdktf.DataTerraformRemoteStateSwiftConfig(
defaults: typing.Mapping[typing.Any] = None,
workspace: str = None,
container: str,
application_credential_id: str = None,
application_credential_name: str = None,
application_credential_secret: str = None,
archive_container: str = None,
auth_url: str = None,
cacert_file: str = None,
cert: str = None,
cloud: str = None,
default_domain: str = None,
domain_id: str = None,
domain_name: str = None,
expire_after: str = None,
insecure: bool = None,
key: str = None,
password: str = None,
project_domain_id: str = None,
project_domain_name: str = None,
region_name: str = None,
state_name: str = None,
tenant_id: str = None,
tenant_name: str = None,
token: str = None,
user_domain_id: str = None,
user_domain_name: str = None,
user_id: str = None,
user_name: str = None
)
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.
defaults: typing.Mapping[typing.Any]
- 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.
workspace: str
- 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.
container: str
- 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.
application_credential_id: str
- 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.
application_credential_name: str
- 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.
application_credential_secret: str
- 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.
archive_container: str
- 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.
auth_url: str
- 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.
cacert_file: str
- 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.
cert: str
- 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.
cloud: str
- 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.
default_domain: str
- 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.
domain_id: str
- 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.
domain_name: str
- 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.
expire_after: str
- 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.
insecure: bool
- 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.
key: str
- 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.
password: str
- 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.
project_domain_id: str
- 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.
project_domain_name: str
- 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.
region_name: str
- 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.
state_name: str
- 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.
tenant_id: str
- 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.
tenant_name: str
- 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.
token: str
- 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.
user_domain_id: str
- 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.
user_domain_name: str
- 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.
user_id: str
- 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.
user_name: str
- Type: str
EncodingOptions
Properties to string encodings.
Initializer
import cdktf
cdktf.EncodingOptions(
display_hint: str = None
)
Properties
Name | Type | Description |
---|---|---|
display_hint | str | A hint for the Token's purpose when stringifying it. |
display_hint
Optional
display_hint: str
- 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
import cdktf
cdktf.FileProvisioner(
destination: str,
type: str,
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
content: str = None,
source: str = None
)
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
destination: str
- 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
- Type: str
connection
Optional
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
- 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
content: str
- Type: str
The destination path to write to on the remote system.
See Destination Paths below for more information.
source
Optional
source: str
- 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
import cdktf
cdktf.GcsBackendConfig(
bucket: str,
access_token: str = None,
credentials: str = None,
encryption_key: str = None,
impersonate_service_account: str = None,
impersonate_service_account_delegates: typing.List[str] = None,
kms_encryption_key: str = None,
prefix: str = None,
storeage_custom_endpoint: str = None
)
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
bucket: str
- Type: str
(Required) The name of the GCS bucket.
This name must be globally unique.
access_token
Optional
access_token: str
- 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
credentials: str
- 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
encryption_key: str
- Type: str
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonate_service_account
Optional
impersonate_service_account: str
- 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
impersonate_service_account_delegates: typing.List[str]
- Type: typing.List[str]
(Optional) The delegation chain for an impersonating a service account.
kms_encryption_key
Optional
kms_encryption_key: str
- 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
prefix: str
- 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
storeage_custom_endpoint: str
- 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
import cdktf
cdktf.HttpBackendConfig(
address: str,
client_ca_certificate_pem: str = None,
client_certificate_pem: str = None,
client_private_key_pem: str = None,
lock_address: str = None,
lock_method: str = None,
password: str = None,
retry_max: typing.Union[int, float] = None,
retry_wait_max: typing.Union[int, float] = None,
retry_wait_min: typing.Union[int, float] = None,
skip_cert_verification: bool = None,
unlock_address: str = None,
unlock_method: str = None,
update_method: str = None,
username: str = None
)
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
address: str
- Type: str
(Required) The address of the REST endpoint.
client_ca_certificate_pem
Optional
client_ca_certificate_pem: str
- Type: str
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
client_certificate_pem
Optional
client_certificate_pem: str
- 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
client_private_key_pem: str
- Type: str
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lock_address
Optional
lock_address: str
- Type: str
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lock_method
Optional
lock_method: str
- Type: str
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
password: str
- Type: str
(Optional) The password for HTTP basic authentication.
retry_max
Optional
retry_max: typing.Union[int, float]
- Type: typing.Union[int, float]
(Optional) The number of HTTP request retries.
Defaults to 2.
retry_wait_max
Optional
retry_wait_max: typing.Union[int, float]
- Type: typing.Union[int, float]
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retry_wait_min
Optional
retry_wait_min: typing.Union[int, float]
- Type: typing.Union[int, float]
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skip_cert_verification
Optional
skip_cert_verification: bool
- Type: bool
(Optional) Whether to skip TLS verification.
Defaults to false.
unlock_address
Optional
unlock_address: str
- Type: str
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlock_method
Optional
unlock_method: str
- Type: str
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
update_method
Optional
update_method: str
- Type: str
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
username: str
- Type: str
(Optional) The username for HTTP basic authentication.
LazyAnyValueOptions
Options for creating lazy untyped tokens.
Initializer
import cdktf
cdktf.LazyAnyValueOptions(
display_hint: str = None,
omit_empty_array: bool = None
)
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
display_hint: str
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty_array
Optional
omit_empty_array: bool
- 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
import cdktf
cdktf.LazyListValueOptions(
display_hint: str = None,
omit_empty: bool = None
)
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
display_hint: str
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty
Optional
omit_empty: bool
- Type: bool
- Default: false
If the produced list is empty, return 'undefined' instead.
LazyStringValueOptions
Options for creating a lazy string token.
Initializer
import cdktf
cdktf.LazyStringValueOptions(
display_hint: str = None
)
Properties
Name | Type | Description |
---|---|---|
display_hint | str | Use the given name as a display hint. |
display_hint
Optional
display_hint: str
- 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
import cdktf
cdktf.LocalBackendConfig(
path: str = None,
workspace_dir: str = None
)
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
path: str
- Type: str
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspace_dir
Optional
workspace_dir: str
- 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
import cdktf
cdktf.LocalExecProvisioner(
command: str,
type: str,
environment: typing.Mapping[str] = None,
interpreter: typing.List[str] = None,
when: str = None,
working_dir: str = None
)
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
command: str
- 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
- Type: str
environment
Optional
environment: typing.Mapping[str]
- 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
interpreter: typing.List[str]
- 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
when: str
- 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
working_dir: str
- 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
import cdktf
cdktf.OssAssumeRole(
role_arn: str,
policy: str = None,
session_expiration: typing.Union[int, float] = None,
session_name: str = None
)
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
role_arn: str
- Type: str
policy
Optional
policy: str
- Type: str
session_expiration
Optional
session_expiration: typing.Union[int, float]
- Type: typing.Union[int, float]
session_name
Optional
session_name: str
- Type: str
OssBackendConfig
Initializer
import cdktf
cdktf.OssBackendConfig(
bucket: str,
access_key: str = None,
acl: str = None,
assume_role: OssAssumeRole = None,
assume_role_policy: str = None,
assume_role_role_arn: str = None,
assume_role_session_expiration: typing.Union[int, float] = None,
assume_role_session_name: str = None,
ecs_role_name: str = None,
encrypt: bool = None,
endpoint: str = None,
key: str = None,
prefix: str = None,
profile: str = None,
region: str = None,
secret_key: str = None,
security_token: str = None,
shared_credentials_file: str = None,
sts_endpoint: str = None,
tablestore_endpoint: str = None,
tablestore_table: str = None
)
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
bucket: str
- Type: str
(Required) The name of the OSS bucket.
access_key
Optional
access_key: str
- Type: str
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
acl: str
- Type: str
(Optional) Object ACL to be applied to the state file.
assume_role
Optional
assume_role
- Deprecated: Use flattened assume role options
assume_role: OssAssumeRole
- Type: OssAssumeRole
assume_role_policy
Optional
assume_role_policy: str
- 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
assume_role_role_arn: str
- 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
assume_role_session_expiration: typing.Union[int, float]
- 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
assume_role_session_name: str
- 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
ecs_role_name: str
- 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
encrypt: bool
- 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
endpoint: str
- Type: str
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
key: str
- Type: str
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
prefix: str
- Type: str
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
profile: str
- 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
region: str
- Type: str
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secret_key
Optional
secret_key: str
- Type: str
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
security_token
Optional
security_token: str
- Type: str
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
shared_credentials_file
Optional
shared_credentials_file: str
- 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
sts_endpoint: str
- 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
tablestore_endpoint: str
- Type: str
(Optional) A custom endpoint for the TableStore API.
tablestore_table
Optional
tablestore_table: str
- 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
import cdktf
cdktf.PgBackendConfig(
conn_str: str,
schema_name: str = None,
skip_index_creation: bool = None,
skip_schema_creation: bool = None,
skip_table_creation: bool = None
)
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
conn_str: str
- 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
schema_name: str
- 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
skip_index_creation: bool
- 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
skip_schema_creation: bool
- 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
skip_table_creation: bool
- 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
import cdktf
cdktf.Postcondition(
condition: typing.Any,
error_message: str
)
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
condition: typing.Any
- 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
error_message: str
- 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
import cdktf
cdktf.Precondition(
condition: typing.Any,
error_message: str
)
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
condition: typing.Any
- 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
error_message: str
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
RemoteBackendConfig
Initializer
import cdktf
cdktf.RemoteBackendConfig(
organization: str,
workspaces: IRemoteWorkspace,
hostname: str = None,
token: str = None
)
Properties
Name | Type | Description |
---|---|---|
organization | str | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | str | No description. |
token | str | No description. |
organization
Required
organization: str
- Type: str
workspaces
Required
workspaces: IRemoteWorkspace
- Type: IRemoteWorkspace
hostname
Optional
hostname: str
- Type: str
token
Optional
token: str
- 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
import cdktf
cdktf.RemoteExecProvisioner(
type: str,
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
inline: typing.List[str] = None,
script: str = None,
scripts: typing.List[str] = None
)
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
- Type: str
connection
Optional
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
- 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
inline: typing.List[str]
- 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
script: str
- 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
scripts: typing.List[str]
- 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
import cdktf
cdktf.ResolveOptions(
resolver: ITokenResolver,
scope: IConstruct,
preparing: bool = None
)
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
resolver: ITokenResolver
- Type: ITokenResolver
The resolver to apply to any resolvable tokens found.
scope
Required
scope: IConstruct
- Type: constructs.IConstruct
The scope from which resolution is performed.
preparing
Optional
preparing: bool
- Type: bool
- Default: false
Whether the resolution is being executed during the prepare phase or not.
S3BackendAssumeRoleConfig
Initializer
import cdktf
cdktf.S3BackendAssumeRoleConfig(
role_arn: str,
duration: str = None,
external_id: str = None,
policy: str = None,
policy_arns: typing.List[str] = None,
session_name: str = None,
source_identity: str = None,
tags: typing.Mapping[str] = None,
transitive_tag_keys: typing.List[str] = None
)
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
role_arn: str
- Type: str
(Required) Amazon Resource Name (ARN) of the IAM Role to assume.
duration
Optional
duration: str
- 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
external_id: str
- Type: str
(Optional) External identifier to use when assuming the role.
policy
Optional
policy: str
- Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
policy_arns
Optional
policy_arns: typing.List[str]
- 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
session_name: str
- Type: str
(Optional) Session name to use when assuming the role.
source_identity
Optional
source_identity: str
- Type: str
(Optional) Source identity specified by the principal assuming the.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
(Optional) Map of assume role session tags.
transitive_tag_keys
Optional
transitive_tag_keys: typing.List[str]
- Type: typing.List[str]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
S3BackendAssumeRoleWithWebIdentityConfig
Initializer
import cdktf
cdktf.S3BackendAssumeRoleWithWebIdentityConfig(
duration: str = None,
policy: str = None,
policy_arns: typing.List[str] = None,
role_arn: str = None,
session_name: str = None,
web_identity_token: str = None,
web_identity_token_file: str = None
)
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
duration: str
- 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
policy: str
- Type: str
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
policy_arns
Optional
policy_arns: typing.List[str]
- 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
role_arn: str
- 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
session_name: str
- 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
web_identity_token: str
- 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
web_identity_token_file: str
- 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
import cdktf
cdktf.S3BackendConfig(
bucket: str,
key: str,
access_key: str = None,
acl: str = None,
allowed_account_ids: str = None,
assume_role: S3BackendAssumeRoleConfig = None,
assume_role_policy: str = None,
assume_role_policy_arns: typing.List[str] = None,
assume_role_tags: typing.Mapping[str] = None,
assume_role_transitive_tag_keys: typing.List[str] = None,
assume_role_with_web_identity: S3BackendAssumeRoleWithWebIdentityConfig = None,
custom_ca_bundle: str = None,
dynamodb_endpoint: str = None,
dynamodb_table: str = None,
ec2_metadata_service_endpoint: str = None,
ec2_metadata_service_endpoint_mode: str = None,
encrypt: bool = None,
endpoint: str = None,
endpoints: S3BackendEndpointConfig = None,
external_id: str = None,
forbidden_account_ids: str = None,
force_path_style: bool = None,
http_proxy: str = None,
https_proxy: str = None,
iam_endpoint: str = None,
insecure: bool = None,
kms_key_id: str = None,
max_retries: typing.Union[int, float] = None,
no_proxy: str = None,
profile: str = None,
region: str = None,
retry_mode: str = None,
role_arn: str = None,
secret_key: str = None,
session_name: str = None,
shared_config_files: typing.List[str] = None,
shared_credentials_file: str = None,
shared_credentials_files: typing.List[str] = None,
skip_credentials_validation: bool = None,
skip_metadata_api_check: bool = None,
skip_region_validation: bool = None,
skip_requesting_account_id: bool = None,
skip_s3_checksum: bool = None,
sse_customer_key: str = None,
sts_endpoint: str = None,
sts_region: str = None,
token: str = None,
use_legacy_workflow: bool = None,
use_path_style: bool = None,
workspace_key_prefix: str = None
)
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
bucket: str
- Type: str
Name of the S3 Bucket.
key
Required
key: str
- 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
access_key: str
- 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
acl: str
- Type: str
(Optional) Canned ACL to be applied to the state file.
allowed_account_ids
Optional
allowed_account_ids: str
- 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
assume_role: S3BackendAssumeRoleConfig
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.
assume_role_policy: str
- 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.
assume_role_policy_arns: typing.List[str]
- 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.
assume_role_tags: typing.Mapping[str]
- 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.
assume_role_transitive_tag_keys: typing.List[str]
- 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: S3BackendAssumeRoleWithWebIdentityConfig
Assume Role With Web Identity Configuration.
custom_ca_bundle
Optional
custom_ca_bundle: str
- 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
dynamodb_endpoint: str
- 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
dynamodb_table: str
- 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
ec2_metadata_service_endpoint: str
- 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
ec2_metadata_service_endpoint_mode: str
- 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
encrypt: bool
- Type: bool
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
- Deprecated: Use endpoints.s3 instead
endpoint: str
- Type: str
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
endpoints: S3BackendEndpointConfig
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
external_id
Optional
external_id
- Deprecated: Use assume_role.external_id instead.
external_id: str
- Type: str
(Optional) External identifier to use when assuming the role.
forbidden_account_ids
Optional
forbidden_account_ids: str
- 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
force_path_style: bool
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
http_proxy
Optional
http_proxy: str
- 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
https_proxy: str
- 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
iam_endpoint: str
- 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
insecure: bool
- 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
kms_key_id: str
- 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
max_retries: typing.Union[int, float]
- 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
no_proxy: str
- 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
profile: str
- 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
region: str
- 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
retry_mode: str
- 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.
role_arn: str
- Type: str
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secret_key
Optional
secret_key: str
- 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.
session_name: str
- Type: str
(Optional) Session name to use when assuming the role.
shared_config_files
Optional
shared_config_files: typing.List[str]
- Type: typing.List[str]
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
shared_credentials_file
Optional
shared_credentials_file: str
- Type: str
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
shared_credentials_files
Optional
shared_credentials_files: typing.List[str]
- Type: typing.List[str]
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skip_credentials_validation
Optional
skip_credentials_validation: bool
- Type: bool
(Optional) Skip credentials validation via the STS API.
skip_metadata_api_check
Optional
skip_metadata_api_check: bool
- Type: bool
(Optional) Skip usage of EC2 Metadata API.
skip_region_validation
Optional
skip_region_validation: bool
- Type: bool
(Optional) Skip validation of provided region name.
skip_requesting_account_id
Optional
skip_requesting_account_id: bool
- 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
skip_s3_checksum: bool
- Type: bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sse_customer_key
Optional
sse_customer_key: str
- 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
sts_endpoint: str
- 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
sts_region: str
- Type: str
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
token: str
- Type: str
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
use_legacy_workflow
Optional
use_legacy_workflow: bool
- 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
use_path_style: bool
- Type: bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspace_key_prefix
Optional
workspace_key_prefix: str
- 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
import cdktf
cdktf.S3BackendEndpointConfig(
dynamodb: str = None,
iam: str = None,
s3: str = None,
sso: str = None,
sts: str = None
)
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
dynamodb: str
- 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
iam: str
- 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
s3: str
- 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
sso: str
- 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
sts: str
- 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
import cdktf
cdktf.SSHProvisionerConnection(
host: str,
type: str,
agent: str = None,
agent_identity: str = None,
bastion_certificate: str = None,
bastion_host: str = None,
bastion_host_key: str = None,
bastion_password: str = None,
bastion_port: typing.Union[int, float] = None,
bastion_private_key: str = None,
bastion_user: str = None,
certificate: str = None,
host_key: str = None,
password: str = None,
port: typing.Union[int, float] = None,
private_key: str = None,
proxy_host: str = None,
proxy_port: typing.Union[int, float] = None,
proxy_scheme: str = None,
proxy_user_name: str = None,
proxy_user_password: str = None,
script_path: str = None,
target_platform: str = None,
timeout: str = None,
user: str = None
)
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
host: str
- Type: str
The address of the resource to connect to.
type
Required
type: str
- 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
agent: str
- 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
agent_identity: str
- Type: str
The preferred identity from the ssh agent for authentication.
bastion_certificate
Optional
bastion_certificate: str
- 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
bastion_host: str
- 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
bastion_host_key: str
- Type: str
The public key from the remote host or the signing CA, used to verify the host connection.
bastion_password
Optional
bastion_password: str
- Type: str
The password to use for the bastion host.
bastion_port
Optional
bastion_port: typing.Union[int, float]
- Type: typing.Union[int, float]
The port to use connect to the bastion host.
bastion_private_key
Optional
bastion_private_key: str
- 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
bastion_user: str
- Type: str
The user for the connection to the bastion host.
certificate
Optional
certificate: str
- 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
host_key: str
- Type: str
The public key from the remote host or the signing CA, used to verify the connection.
password
Optional
password: str
- Type: str
The password to use for the connection.
port
Optional
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 22
The port to connect to.
private_key
Optional
private_key: str
- 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
proxy_host: str
- 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
proxy_port: typing.Union[int, float]
- Type: typing.Union[int, float]
The port to use connect to the proxy host.
proxy_scheme
Optional
proxy_scheme: str
- Type: str
The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy.
proxy_user_name
Optional
proxy_user_name: str
- 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
proxy_user_password: str
- 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
script_path: str
- 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
target_platform: str
- 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
timeout: str
- 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
user: str
- Type: str
- Default: root
The user to use for the connection.
StackAnnotation
Initializer
import cdktf
cdktf.StackAnnotation(
construct_path: str,
level: AnnotationMetadataEntryType,
message: str,
stacktrace: typing.List[str] = None
)
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
construct_path: str
- Type: str
level
Required
level: AnnotationMetadataEntryType
message
Required
message: str
- Type: str
stacktrace
Optional
stacktrace: typing.List[str]
- Type: typing.List[str]
StackManifest
Initializer
import cdktf
cdktf.StackManifest(
annotations: typing.List[StackAnnotation],
construct_path: str,
dependencies: typing.List[str],
name: str,
stack_metadata_path: str,
synthesized_stack_path: str,
working_directory: str
)
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
annotations: typing.List[StackAnnotation]
- Type: typing.List[StackAnnotation]
construct_path
Required
construct_path: str
- Type: str
dependencies
Required
dependencies: typing.List[str]
- Type: typing.List[str]
name
Required
name: str
- Type: str
stack_metadata_path
Required
stack_metadata_path: str
- Type: str
synthesized_stack_path
Required
synthesized_stack_path: str
- Type: str
working_directory
Required
working_directory: str
- Type: str
SwiftBackendConfig
Initializer
import cdktf
cdktf.SwiftBackendConfig(
container: str,
application_credential_id: str = None,
application_credential_name: str = None,
application_credential_secret: str = None,
archive_container: str = None,
auth_url: str = None,
cacert_file: str = None,
cert: str = None,
cloud: str = None,
default_domain: str = None,
domain_id: str = None,
domain_name: str = None,
expire_after: str = None,
insecure: bool = None,
key: str = None,
password: str = None,
project_domain_id: str = None,
project_domain_name: str = None,
region_name: str = None,
state_name: str = None,
tenant_id: str = None,
tenant_name: str = None,
token: str = None,
user_domain_id: str = None,
user_domain_name: str = None,
user_id: str = None,
user_name: str = None
)
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.
container: str
- 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.
application_credential_id: str
- 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.
application_credential_name: str
- 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.
application_credential_secret: str
- 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.
archive_container: str
- 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.
auth_url: str
- 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.
cacert_file: str
- 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.
cert: str
- 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.
cloud: str
- 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.
default_domain: str
- 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.
domain_id: str
- 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.
domain_name: str
- 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.
expire_after: str
- 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.
insecure: bool
- 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.
key: str
- 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.
password: str
- 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.
project_domain_id: str
- 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.
project_domain_name: str
- 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.
region_name: str
- 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.
state_name: str
- 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.
tenant_id: str
- 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.
tenant_name: str
- 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.
token: str
- 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.
user_domain_id: str
- 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.
user_domain_name: str
- 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.
user_id: str
- 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.
user_name: str
- Type: str
TerraformAssetConfig
Initializer
import cdktf
cdktf.TerraformAssetConfig(
path: str,
asset_hash: str = None,
type: AssetType = None
)
Properties
Name | Type | Description |
---|---|---|
path | str | No description. |
asset_hash | str | No description. |
type | AssetType | No description. |
path
Required
path: str
- Type: str
asset_hash
Optional
asset_hash: str
- Type: str
type
Optional
type: AssetType
- Type: AssetType
TerraformCondition
Initializer
import cdktf
cdktf.TerraformCondition(
condition: typing.Any,
error_message: str
)
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
condition: typing.Any
- 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
error_message: str
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
TerraformConstructor
Initializer
from cdktf import testing_matchers
testingMatchers.TerraformConstructor(
tf_resource_type: str
)
Properties
Name | Type | Description |
---|---|---|
tf_resource_type | str | No description. |
tf_resource_type
Required
tf_resource_type: str
- Type: str
TerraformElementMetadata
Initializer
import cdktf
cdktf.TerraformElementMetadata(
path: str,
stack_trace: typing.List[str],
unique_id: str
)
Properties
Name | Type | Description |
---|---|---|
path | str | No description. |
stack_trace | typing.List[str] | No description. |
unique_id | str | No description. |
path
Required
path: str
- Type: str
stack_trace
Required
stack_trace: typing.List[str]
- Type: typing.List[str]
unique_id
Required
unique_id: str
- Type: str
TerraformHclModuleConfig
Initializer
import cdktf
cdktf.TerraformHclModuleConfig(
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None,
skip_asset_creation_from_local_modules: bool = None,
source: str,
version: str = None,
variables: typing.Mapping[typing.Any] = None
)
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
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
providers
Optional
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
skip_asset_creation_from_local_modules: bool
- Type: bool
source
Required
source: str
- Type: str
version
Optional
version: str
- Type: str
variables
Optional
variables: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
TerraformMetaArguments
Initializer
import cdktf
cdktf.TerraformMetaArguments(
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
count: typing.Union[typing.Union[int, float], TerraformCount] = None,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
lifecycle: TerraformResourceLifecycle = None,
provider: TerraformProvider = None,
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] = None
)
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
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
count: typing.Union[typing.Union[int, float], TerraformCount]
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
lifecycle
Optional
lifecycle: TerraformResourceLifecycle
provider
Optional
provider: TerraformProvider
- Type: TerraformProvider
provisioners
Optional
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
TerraformModuleConfig
Initializer
import cdktf
cdktf.TerraformModuleConfig(
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None,
skip_asset_creation_from_local_modules: bool = None,
source: str,
version: str = None
)
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
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
providers
Optional
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
skip_asset_creation_from_local_modules: bool
- Type: bool
source
Required
source: str
- Type: str
version
Optional
version: str
- Type: str
TerraformModuleProvider
Initializer
import cdktf
cdktf.TerraformModuleProvider(
module_alias: str,
provider: TerraformProvider
)
Properties
Name | Type | Description |
---|---|---|
module_alias | str | No description. |
provider | TerraformProvider | No description. |
module_alias
Required
module_alias: str
- Type: str
provider
Required
provider: TerraformProvider
- Type: TerraformProvider
TerraformModuleUserConfig
Initializer
import cdktf
cdktf.TerraformModuleUserConfig(
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None,
skip_asset_creation_from_local_modules: bool = None
)
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
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
providers
Optional
providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
- Type: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]]
skip_asset_creation_from_local_modules
Optional
skip_asset_creation_from_local_modules: bool
- Type: bool
TerraformOutputConfig
Initializer
import cdktf
cdktf.TerraformOutputConfig(
value: typing.Any,
depends_on: typing.List[ITerraformDependable] = None,
description: str = None,
precondition: Precondition = None,
sensitive: bool = None,
static_id: bool = None
)
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
value: typing.Any
- Type: typing.Any
depends_on
Optional
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
description
Optional
description: str
- Type: str
precondition
Optional
precondition: Precondition
- Type: Precondition
sensitive
Optional
sensitive: bool
- Type: bool
static_id
Optional
static_id: bool
- 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
import cdktf
cdktf.TerraformProviderConfig(
terraform_resource_type: str,
terraform_generator_metadata: TerraformProviderGeneratorMetadata = None,
terraform_provider_source: str = None
)
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
terraform_resource_type: str
- Type: str
terraform_generator_metadata
Optional
terraform_generator_metadata: TerraformProviderGeneratorMetadata
terraform_provider_source
Optional
terraform_provider_source: str
- Type: str
TerraformProviderGeneratorMetadata
Initializer
import cdktf
cdktf.TerraformProviderGeneratorMetadata(
provider_name: str,
provider_version: str = None,
provider_version_constraint: str = None
)
Properties
Name | Type | Description |
---|---|---|
provider_name | str | No description. |
provider_version | str | No description. |
provider_version_constraint | str | No description. |
provider_name
Required
provider_name: str
- Type: str
provider_version
Optional
provider_version: str
- Type: str
provider_version_constraint
Optional
provider_version_constraint: str
- Type: str
TerraformResourceConfig
Initializer
import cdktf
cdktf.TerraformResourceConfig(
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection] = None,
count: typing.Union[typing.Union[int, float], TerraformCount] = None,
depends_on: typing.List[ITerraformDependable] = None,
for_each: ITerraformIterator = None,
lifecycle: TerraformResourceLifecycle = None,
provider: TerraformProvider = None,
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]] = None,
terraform_resource_type: str,
terraform_generator_metadata: TerraformProviderGeneratorMetadata = None
)
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
connection: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
- Type: typing.Union[SSHProvisionerConnection, WinrmProvisionerConnection]
count
Optional
count: typing.Union[typing.Union[int, float], TerraformCount]
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
depends_on: typing.List[ITerraformDependable]
- Type: typing.List[ITerraformDependable]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
lifecycle
Optional
lifecycle: TerraformResourceLifecycle
provider
Optional
provider: TerraformProvider
- Type: TerraformProvider
provisioners
Optional
provisioners: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
- Type: typing.List[typing.Union[FileProvisioner, LocalExecProvisioner, RemoteExecProvisioner]]
terraform_resource_type
Required
terraform_resource_type: str
- Type: str
terraform_generator_metadata
Optional
terraform_generator_metadata: TerraformProviderGeneratorMetadata
TerraformResourceImport
Initializer
import cdktf
cdktf.TerraformResourceImport(
id: str,
provider: TerraformProvider = None
)
Properties
Name | Type | Description |
---|---|---|
id | str | No description. |
provider | TerraformProvider | No description. |
id
Required
id: str
- Type: str
provider
Optional
provider: TerraformProvider
- Type: TerraformProvider
TerraformResourceLifecycle
Initializer
import cdktf
cdktf.TerraformResourceLifecycle(
create_before_destroy: bool = None,
ignore_changes: typing.Union[typing.List[str], str] = None,
postcondition: typing.List[Postcondition] = None,
precondition: typing.List[Precondition] = None,
prevent_destroy: bool = None,
replace_triggered_by: typing.List[typing.Union[str, ITerraformDependable]] = None
)
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
create_before_destroy: bool
- Type: bool
ignore_changes
Optional
ignore_changes: typing.Union[typing.List[str], str]
- Type: typing.Union[typing.List[str], str]
postcondition
Optional
postcondition: typing.List[Postcondition]
- Type: typing.List[Postcondition]
precondition
Optional
precondition: typing.List[Precondition]
- Type: typing.List[Precondition]
prevent_destroy
Optional
prevent_destroy: bool
- Type: bool
replace_triggered_by
Optional
replace_triggered_by: typing.List[typing.Union[str, ITerraformDependable]]
- Type: typing.List[typing.Union[str, ITerraformDependable]]
TerraformResourceMoveById
Initializer
import cdktf
cdktf.TerraformResourceMoveById(
from: str,
to: str
)
Properties
from
Required
from: str
- Type: str
to
Required
to: str
- Type: str
TerraformResourceMoveByTarget
Initializer
import cdktf
cdktf.TerraformResourceMoveByTarget(
move_target: str,
index: typing.Union[str, typing.Union[int, float]] = None
)
Properties
Name | Type | Description |
---|---|---|
move_target | str | No description. |
index | typing.Union[str, typing.Union[int, float]] | No description. |
move_target
Required
move_target: str
- Type: str
index
Optional
index: typing.Union[str, typing.Union[int, float]]
- Type: typing.Union[str, typing.Union[int, float]]
TerraformStackMetadata
Initializer
import cdktf
cdktf.TerraformStackMetadata(
backend: str,
stack_name: str,
version: str,
cloud: str = None
)
Properties
Name | Type | Description |
---|---|---|
backend | str | No description. |
stack_name | str | No description. |
version | str | No description. |
cloud | str | No description. |
backend
Required
backend: str
- Type: str
stack_name
Required
stack_name: str
- Type: str
version
Required
version: str
- Type: str
cloud
Optional
cloud: str
- Type: str
TerraformVariableConfig
Initializer
import cdktf
cdktf.TerraformVariableConfig(
default: typing.Any = None,
description: str = None,
nullable: bool = None,
sensitive: bool = None,
type: str = None,
validation: typing.List[TerraformVariableValidationConfig] = None
)
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
default: typing.Any
- Type: typing.Any
description
Optional
description: str
- Type: str
nullable
Optional
nullable: bool
- Type: bool
sensitive
Optional
sensitive: bool
- Type: bool
type
Optional
type: str
- 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
validation: typing.List[TerraformVariableValidationConfig]
- 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
import cdktf
cdktf.TerraformVariableValidationConfig(
condition: typing.Any,
error_message: str
)
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
condition: typing.Any
- 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
error_message: str
- Type: str
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
TestingAppConfig
Initializer
import cdktf
cdktf.TestingAppConfig(
context: typing.Mapping[typing.Any] = None,
enable_future_flags: bool = None,
fake_cdktf_json_path: bool = None,
outdir: str = None,
stack_traces: bool = None,
stub_version: bool = None
)
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
context: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
enable_future_flags
Optional
enable_future_flags: bool
- Type: bool
fake_cdktf_json_path
Optional
fake_cdktf_json_path: bool
- Type: bool
outdir
Optional
outdir: str
- Type: str
stack_traces
Optional
stack_traces: bool
- Type: bool
stub_version
Optional
stub_version: bool
- 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
import cdktf
cdktf.WinrmProvisionerConnection(
host: str,
type: str,
cacert: str = None,
https: bool = None,
insecure: bool = None,
password: str = None,
port: typing.Union[int, float] = None,
script_path: str = None,
timeout: str = None,
use_ntlm: bool = None,
user: str = None
)
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
host: str
- Type: str
The address of the resource to connect to.
type
Required
type: str
- 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
cacert: str
- Type: str
The CA certificate to validate against.
https
Optional
https: bool
- Type: bool
Set to true to connect using HTTPS instead of HTTP.
insecure
Optional
insecure: bool
- Type: bool
Set to true to skip validating the HTTPS certificate chain.
password
Optional
password: str
- Type: str
The password to use for the connection.
port
Optional
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 22
The port to connect to.
script_path
Optional
script_path: str
- 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
timeout: str
- 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
use_ntlm: bool
- 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
user: str
- 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
def add_error(
message: str
) - > None
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
def add_info(
message: str
) - > None
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
def add_warning(
message: str
) - > None
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
import cdktf
cdktf.Annotations.of(
scope: IConstruct
)
Returns the annotations API for a construct scope.
scope
Required
- Type: constructs.IConstruct
The scope.
AnyListList
Initializers
import cdktf
cdktf.AnyListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
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
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > IResolvable
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
creation_stack: typing.List[str]
- 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: str
- Type: str
AnyListMap
Initializers
import cdktf
cdktf.AnyListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > IResolvable
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
creation_stack: typing.List[str]
- 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: str
- Type: str
AnyMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.AnyMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > typing.Any
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
AnyMapList
Initializers
import cdktf
cdktf.AnyMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > AnyMap
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
creation_stack: typing.List[str]
- 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: str
- 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
def add(
aspect: IAspect
) - > None
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
import cdktf
cdktf.Aspects.of(
scope: IConstruct
)
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
all: typing.List[IAspect]
- 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
from cdktf import testing_matchers
testingMatchers.AssertionReturn(
message: str,
pass: bool
)
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
message: str
- Type: str
String message containing information about the result of the assertion.
pass
Required
pass: bool
- Type: bool
Boolean pass denoting the success of the assertion.
BooleanList
Initializers
import cdktf
cdktf.BooleanList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
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
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > IResolvable
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
creation_stack: typing.List[str]
- 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: str
- Type: str
BooleanListList
Initializers
import cdktf
cdktf.BooleanListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
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
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > IResolvable
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
creation_stack: typing.List[str]
- 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: str
- Type: str
BooleanListMap
Initializers
import cdktf
cdktf.BooleanListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > IResolvable
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
creation_stack: typing.List[str]
- 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: str
- Type: str
BooleanMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.BooleanMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > IResolvable
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
BooleanMapList
Initializers
import cdktf
cdktf.BooleanMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > BooleanMap
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
creation_stack: typing.List[str]
- 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: str
- Type: str
CloudWorkspace
A cloud workspace can either be a single named workspace, or a list of tagged workspaces.
Initializers
import cdktf
cdktf.CloudWorkspace()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_terraform
def to_terraform() - > typing.Any
ComplexComputedList
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import cdktf
cdktf.ComplexComputedList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
complex_computed_list_index: str,
wraps_set: bool = None
)
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
def compute_fqn() - > str
get_any_map_attribute
get_any_map_attribute
def get_any_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Any]
terraform_attribute
Required
- Type: str
get_boolean_attribute
get_boolean_attribute
def get_boolean_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
get_boolean_map_attribute
def get_boolean_map_attribute(
terraform_attribute: str
) - > typing.Mapping[bool]
terraform_attribute
Required
- Type: str
get_list_attribute
get_list_attribute
def get_list_attribute(
terraform_attribute: str
) - > typing.List[str]
terraform_attribute
Required
- Type: str
get_number_attribute
get_number_attribute
def get_number_attribute(
terraform_attribute: str
) - > typing.Union[int, float]
terraform_attribute
Required
- Type: str
get_number_list_attribute
get_number_list_attribute
def get_number_list_attribute(
terraform_attribute: str
) - > typing.List[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_number_map_attribute
get_number_map_attribute
def get_number_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_string_attribute
get_string_attribute
def get_string_attribute(
terraform_attribute: str
) - > str
terraform_attribute
Required
- Type: str
get_string_map_attribute
get_string_map_attribute
def get_string_map_attribute(
terraform_attribute: str
) - > typing.Mapping[str]
terraform_attribute
Required
- Type: str
interpolation_for_attribute
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
to_string
def to_string() - > str
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
creation_stack: typing.List[str]
- 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
fqn: str
- Type: str
ComplexList
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.ComplexList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
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
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
ComplexMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.ComplexMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
ComplexObject
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import cdktf
cdktf.ComplexObject(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
complex_object_is_from_set: bool,
complex_object_index: typing.Union[str, typing.Union[int, float]] = None
)
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
def compute_fqn() - > str
get_any_map_attribute
def get_any_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Any]
terraform_attribute
Required
- Type: str
get_boolean_attribute
def get_boolean_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
def get_boolean_map_attribute(
terraform_attribute: str
) - > typing.Mapping[bool]
terraform_attribute
Required
- Type: str
get_list_attribute
def get_list_attribute(
terraform_attribute: str
) - > typing.List[str]
terraform_attribute
Required
- Type: str
get_number_attribute
def get_number_attribute(
terraform_attribute: str
) - > typing.Union[int, float]
terraform_attribute
Required
- Type: str
get_number_list_attribute
def get_number_list_attribute(
terraform_attribute: str
) - > typing.List[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_number_map_attribute
def get_number_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_string_attribute
def get_string_attribute(
terraform_attribute: str
) - > str
terraform_attribute
Required
- Type: str
get_string_map_attribute
def get_string_map_attribute(
terraform_attribute: str
) - > typing.Mapping[str]
terraform_attribute
Required
- Type: str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
DefaultTokenResolver
- Implements: ITokenResolver
Default resolver implementation.
Initializers
import cdktf
cdktf.DefaultTokenResolver(
concat: IFragmentConcatenator
)
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
def resolve_list(
xs: typing.List[str],
context: IResolveContext
) - > typing.Any
Resolves a list of string.
xs
Required
- Type: typing.List[str]
context
Required
- Type: IResolveContext
resolve_map
def resolve_map(
xs: typing.Mapping[typing.Any],
context: IResolveContext
) - > typing.Any
Resolves a map token.
xs
Required
- Type: typing.Mapping[typing.Any]
context
Required
- Type: IResolveContext
resolve_number_list
def resolve_number_list(
xs: typing.List[typing.Union[int, float]],
context: IResolveContext
) - > typing.Any
Resolves a list of numbers.
xs
Required
- Type: typing.List[typing.Union[int, float]]
context
Required
- Type: IResolveContext
resolve_string
def resolve_string(
fragments: TokenizedStringFragments,
context: IResolveContext
) - > typing.Any
Resolve string fragments to Tokens.
fragments
Required
- Type: TokenizedStringFragments
context
Required
- Type: IResolveContext
resolve_token
def resolve_token(
t: IResolvable,
context: IResolveContext,
post_processor: IPostProcessor
) - > typing.Any
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
import cdktf
cdktf.DynamicListTerraformIterator(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]],
map_key_attribute_name: str
)
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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > IResolvable
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
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def keys() - > IResolvable
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
def pluck_property(
property: str
) - > IResolvable
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
def values() - > IResolvable
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
import cdktf
cdktf.DynamicListTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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
# Example automatically generated from non-compiling source. May contain errors.
cert = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
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
import cdktf
cdktf.DynamicListTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.DynamicListTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
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
import cdktf
cdktf.DynamicListTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
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
import cdktf
cdktf.DynamicListTerraformIterator.from_resources(
resource: ITerraformResource
)
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
key: str
- Type: str
Returns the key of the current entry in the map that is being iterated over.
value
Required
value: typing.Any
- Type: typing.Any
Returns the value of the current item iterated over.
Fn
Initializers
import cdktf
cdktf.Fn()
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
import cdktf
cdktf.Fn.abs(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.abspath(
path: str
)
{@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
import cdktf
cdktf.Fn.alltrue(
list: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.anytrue(
list: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.base64decode(
str: str
)
{@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
import cdktf
cdktf.Fn.base64encode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: str
base64gzip
import cdktf
cdktf.Fn.base64gzip(
str: str
)
{@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
import cdktf
cdktf.Fn.base64sha256(
str: str
)
{@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
import cdktf
cdktf.Fn.base64sha512(
str: str
)
{@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
import cdktf
cdktf.Fn.basename(
path: str
)
{@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
import cdktf
cdktf.Fn.can(
expression: typing.Any
)
{@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
import cdktf
cdktf.Fn.ceil(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.chomp(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: str
chunklist
import cdktf
cdktf.Fn.chunklist(
list: typing.List[typing.Any],
size: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.cidrhost(
prefix: str,
hostnum: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.cidrnetmask(
prefix: str
)
{@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
import cdktf
cdktf.Fn.cidrsubnet(
prefix: str,
newbits: typing.Union[int, float],
netnum: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.cidrsubnets(
prefix: str,
newbits: typing.List[typing.Union[int, float]]
)
{@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
import cdktf
cdktf.Fn.coalesce(
vals: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.coalescelist(
vals: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.compact(
list: typing.List[str]
)
{@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
import cdktf
cdktf.Fn.concat(
seqs: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.contains(
list: typing.Any,
value: typing.Any
)
{@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
import cdktf
cdktf.Fn.csvdecode(
str: str
)
{@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
import cdktf
cdktf.Fn.dirname(
path: str
)
{@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
import cdktf
cdktf.Fn.distinct(
list: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.element(
list: typing.Any,
index: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.endswith(
str: str,
suffix: str
)
{@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
import cdktf
cdktf.Fn.file(
path: str
)
{@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
import cdktf
cdktf.Fn.filebase64(
path: str
)
{@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
import cdktf
cdktf.Fn.filebase64sha256(
path: str
)
{@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
import cdktf
cdktf.Fn.filebase64sha512(
path: str
)
{@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
import cdktf
cdktf.Fn.fileexists(
path: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: str
filemd5
import cdktf
cdktf.Fn.filemd5(
path: str
)
{@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
import cdktf
cdktf.Fn.fileset(
path: str,
pattern: str
)
{@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
import cdktf
cdktf.Fn.filesha1(
path: str
)
{@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
import cdktf
cdktf.Fn.filesha256(
path: str
)
{@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
import cdktf
cdktf.Fn.filesha512(
path: str
)
{@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
import cdktf
cdktf.Fn.flatten(
list: typing.Any
)
{@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
import cdktf
cdktf.Fn.floor(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.format(
format: str,
args: typing.List[typing.Any]
)
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
import cdktf
cdktf.Fn.formatdate(
format: str,
time: str
)
{@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
import cdktf
cdktf.Fn.formatlist(
format: str,
args: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.indent(
spaces: typing.Union[int, float],
str: str
)
{@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
import cdktf
cdktf.Fn.index(
list: typing.Any,
value: typing.Any
)
{@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
import cdktf
cdktf.Fn.jsondecode(
str: str
)
{@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
import cdktf
cdktf.Fn.jsonencode(
val: typing.Any
)
{@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
import cdktf
cdktf.Fn.keys(
input_map: typing.Any
)
{@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
import cdktf
cdktf.Fn.length_of(
value: typing.Any
)
{@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
import cdktf
cdktf.Fn.log(
num: typing.Union[int, float],
base: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.lower(
str: str
)
{@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
import cdktf
cdktf.Fn.matchkeys(
values: typing.List[typing.Any],
keys: typing.List[typing.Any],
searchset: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.max(
numbers: typing.List[typing.Union[int, float]]
)
{@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
import cdktf
cdktf.Fn.md5(
str: str
)
{@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
import cdktf
cdktf.Fn.merge(
maps: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.min(
numbers: typing.List[typing.Union[int, float]]
)
{@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
import cdktf
cdktf.Fn.nonsensitive(
value: typing.Any
)
{@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
import cdktf
cdktf.Fn.one(
list: typing.Any
)
{@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
import cdktf
cdktf.Fn.parseint(
number: typing.Any,
base: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.pathexpand(
path: str
)
{@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
import cdktf
cdktf.Fn.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
import cdktf
cdktf.Fn.pow(
num: typing.Union[int, float],
power: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.regex(
pattern: str,
str: str
)
{@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
import cdktf
cdktf.Fn.regexall(
pattern: str,
str: str
)
{@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
import cdktf
cdktf.Fn.replace(
str: str,
substr: str,
replace: str
)
{@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
import cdktf
cdktf.Fn.reverse(
list: typing.Any
)
{@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
import cdktf
cdktf.Fn.rsadecrypt(
ciphertext: str,
privatekey: str
)
{@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
import cdktf
cdktf.Fn.sensitive(
value: typing.Any
)
{@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
import cdktf
cdktf.Fn.setintersection(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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
import cdktf
cdktf.Fn.setproduct(
sets: typing.List[typing.Any]
)
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
import cdktf
cdktf.Fn.setsubtract(
a: typing.List[typing.Any],
b: typing.List[typing.Any]
)
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
import cdktf
cdktf.Fn.setunion(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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
import cdktf
cdktf.Fn.sha1(
str: str
)
{@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
import cdktf
cdktf.Fn.sha256(
str: str
)
{@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
import cdktf
cdktf.Fn.sha512(
str: str
)
{@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
import cdktf
cdktf.Fn.signum(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.slice(
list: typing.Any,
start_index: typing.Union[int, float],
end_index: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.sort(
list: typing.List[str]
)
{@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
import cdktf
cdktf.Fn.split(
separator: str,
str: str
)
{@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
import cdktf
cdktf.Fn.startswith(
str: str,
prefix: str
)
{@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
import cdktf
cdktf.Fn.strcontains(
str: str,
substr: str
)
{@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
import cdktf
cdktf.Fn.strrev(
str: str
)
{@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
import cdktf
cdktf.Fn.substr(
str: str,
offset: typing.Union[int, float],
length: typing.Union[int, float]
)
{@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
import cdktf
cdktf.Fn.sum(
list: typing.Any
)
{@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
import cdktf
cdktf.Fn.templatefile(
path: str,
vars: typing.Any
)
{@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
import cdktf
cdktf.Fn.textdecodebase64(
source: str,
encoding: str
)
{@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
import cdktf
cdktf.Fn.textencodebase64(
str: str,
encoding: str
)
{@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
import cdktf
cdktf.Fn.timeadd(
timestamp: str,
duration: str
)
{@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
import cdktf
cdktf.Fn.timecmp(
timestamp_a: str,
timestamp_b: str
)
{@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
import cdktf
cdktf.Fn.timestamp()
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
import cdktf
cdktf.Fn.title(
str: str
)
{@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
import cdktf
cdktf.Fn.tobool(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: typing.Any
tolist
import cdktf
cdktf.Fn.tolist(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: typing.Any
tomap
import cdktf
cdktf.Fn.tomap(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: typing.Any
tonumber
import cdktf
cdktf.Fn.tonumber(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: typing.Any
toset
import cdktf
cdktf.Fn.toset(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: typing.Any
tostring
import cdktf
cdktf.Fn.tostring(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: typing.Any
transpose
import cdktf
cdktf.Fn.transpose(
values: typing.Any
)
{@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
import cdktf
cdktf.Fn.trim(
str: str,
cutset: str
)
{@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
import cdktf
cdktf.Fn.trimprefix(
str: str,
prefix: str
)
{@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
import cdktf
cdktf.Fn.trimspace(
str: str
)
{@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
import cdktf
cdktf.Fn.trimsuffix(
str: str,
suffix: str
)
{@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
import cdktf
cdktf.Fn.try(
expressions: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.Fn.upper(
str: str
)
{@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
import cdktf
cdktf.Fn.urlencode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: str
uuid
import cdktf
cdktf.Fn.uuid()
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
import cdktf
cdktf.Fn.uuidv5(
namespace: str,
name: str
)
{@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
import cdktf
cdktf.Fn.values(
mapping: typing.Any
)
{@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
import cdktf
cdktf.Fn.yamldecode(
src: str
)
{@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
import cdktf
cdktf.Fn.yamlencode(
value: typing.Any
)
{@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
import cdktf
cdktf.Fn.zipmap(
keys: typing.List[str],
values: typing.Any
)
{@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
import cdktf
cdktf.Fn.bcrypt(
str: str,
cost: typing.Union[int, float] = None
)
{@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
import cdktf
cdktf.Fn.conditional(
condition: typing.Any,
true_value: typing.Any,
false_value: typing.Any
)
{@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
import cdktf
cdktf.Fn.join(
separator: str,
list: typing.List[str]
)
{@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
import cdktf
cdktf.Fn.lookup(
input_map: typing.Any,
key: str,
default_value: typing.Any = None
)
{@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
import cdktf
cdktf.Fn.lookup_nested(
input_map: typing.Any,
path: typing.List[typing.Any]
)
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
import cdktf
cdktf.Fn.range(
start: typing.Union[int, float],
limit: typing.Union[int, float],
step: typing.Union[int, float] = None
)
{@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
import cdktf
cdktf.Fn.raw_string(
str: str
)
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
import cdktf
cdktf.FnGenerated()
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
import cdktf
cdktf.FnGenerated.abs(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.abspath(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.alltrue(
list: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.anytrue(
list: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.base64decode(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.base64encode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: str
base64gzip
import cdktf
cdktf.FnGenerated.base64gzip(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.base64sha256(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.base64sha512(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.basename(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.can(
expression: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.ceil(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.chomp(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: str
chunklist
import cdktf
cdktf.FnGenerated.chunklist(
list: typing.List[typing.Any],
size: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.cidrhost(
prefix: str,
hostnum: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.cidrnetmask(
prefix: str
)
{@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
import cdktf
cdktf.FnGenerated.cidrsubnet(
prefix: str,
newbits: typing.Union[int, float],
netnum: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.cidrsubnets(
prefix: str,
newbits: typing.List[typing.Union[int, float]]
)
{@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
import cdktf
cdktf.FnGenerated.coalesce(
vals: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.coalescelist(
vals: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.compact(
list: typing.List[str]
)
{@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
import cdktf
cdktf.FnGenerated.concat(
seqs: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.contains(
list: typing.Any,
value: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.csvdecode(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.dirname(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.distinct(
list: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.element(
list: typing.Any,
index: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.endswith(
str: str,
suffix: str
)
{@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
import cdktf
cdktf.FnGenerated.file(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.filebase64(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.filebase64sha256(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.filebase64sha512(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.fileexists(
path: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: str
filemd5
import cdktf
cdktf.FnGenerated.filemd5(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.fileset(
path: str,
pattern: str
)
{@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
import cdktf
cdktf.FnGenerated.filesha1(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.filesha256(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.filesha512(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.flatten(
list: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.floor(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.format(
format: str,
args: typing.List[typing.Any]
)
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
import cdktf
cdktf.FnGenerated.formatdate(
format: str,
time: str
)
{@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
import cdktf
cdktf.FnGenerated.formatlist(
format: str,
args: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.indent(
spaces: typing.Union[int, float],
str: str
)
{@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
import cdktf
cdktf.FnGenerated.index(
list: typing.Any,
value: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.jsondecode(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.jsonencode(
val: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.keys(
input_map: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.length_of(
value: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.log(
num: typing.Union[int, float],
base: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.lower(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.matchkeys(
values: typing.List[typing.Any],
keys: typing.List[typing.Any],
searchset: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.max(
numbers: typing.List[typing.Union[int, float]]
)
{@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
import cdktf
cdktf.FnGenerated.md5(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.merge(
maps: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.min(
numbers: typing.List[typing.Union[int, float]]
)
{@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
import cdktf
cdktf.FnGenerated.nonsensitive(
value: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.one(
list: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.parseint(
number: typing.Any,
base: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.pathexpand(
path: str
)
{@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
import cdktf
cdktf.FnGenerated.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
import cdktf
cdktf.FnGenerated.pow(
num: typing.Union[int, float],
power: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.regex(
pattern: str,
str: str
)
{@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
import cdktf
cdktf.FnGenerated.regexall(
pattern: str,
str: str
)
{@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
import cdktf
cdktf.FnGenerated.replace(
str: str,
substr: str,
replace: str
)
{@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
import cdktf
cdktf.FnGenerated.reverse(
list: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.rsadecrypt(
ciphertext: str,
privatekey: str
)
{@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
import cdktf
cdktf.FnGenerated.sensitive(
value: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.setintersection(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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
import cdktf
cdktf.FnGenerated.setproduct(
sets: typing.List[typing.Any]
)
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
import cdktf
cdktf.FnGenerated.setsubtract(
a: typing.List[typing.Any],
b: typing.List[typing.Any]
)
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
import cdktf
cdktf.FnGenerated.setunion(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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
import cdktf
cdktf.FnGenerated.sha1(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.sha256(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.sha512(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.signum(
num: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.slice(
list: typing.Any,
start_index: typing.Union[int, float],
end_index: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.sort(
list: typing.List[str]
)
{@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
import cdktf
cdktf.FnGenerated.split(
separator: str,
str: str
)
{@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
import cdktf
cdktf.FnGenerated.startswith(
str: str,
prefix: str
)
{@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
import cdktf
cdktf.FnGenerated.strcontains(
str: str,
substr: str
)
{@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
import cdktf
cdktf.FnGenerated.strrev(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.substr(
str: str,
offset: typing.Union[int, float],
length: typing.Union[int, float]
)
{@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
import cdktf
cdktf.FnGenerated.sum(
list: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.templatefile(
path: str,
vars: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.textdecodebase64(
source: str,
encoding: str
)
{@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
import cdktf
cdktf.FnGenerated.textencodebase64(
str: str,
encoding: str
)
{@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
import cdktf
cdktf.FnGenerated.timeadd(
timestamp: str,
duration: str
)
{@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
import cdktf
cdktf.FnGenerated.timecmp(
timestamp_a: str,
timestamp_b: str
)
{@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
import cdktf
cdktf.FnGenerated.timestamp()
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
import cdktf
cdktf.FnGenerated.title(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.tobool(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: typing.Any
tolist
import cdktf
cdktf.FnGenerated.tolist(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: typing.Any
tomap
import cdktf
cdktf.FnGenerated.tomap(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: typing.Any
tonumber
import cdktf
cdktf.FnGenerated.tonumber(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: typing.Any
toset
import cdktf
cdktf.FnGenerated.toset(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: typing.Any
tostring
import cdktf
cdktf.FnGenerated.tostring(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: typing.Any
transpose
import cdktf
cdktf.FnGenerated.transpose(
values: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.trim(
str: str,
cutset: str
)
{@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
import cdktf
cdktf.FnGenerated.trimprefix(
str: str,
prefix: str
)
{@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
import cdktf
cdktf.FnGenerated.trimspace(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.trimsuffix(
str: str,
suffix: str
)
{@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
import cdktf
cdktf.FnGenerated.try(
expressions: typing.List[typing.Any]
)
{@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
import cdktf
cdktf.FnGenerated.upper(
str: str
)
{@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
import cdktf
cdktf.FnGenerated.urlencode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: str
uuid
import cdktf
cdktf.FnGenerated.uuid()
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
import cdktf
cdktf.FnGenerated.uuidv5(
namespace: str,
name: str
)
{@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
import cdktf
cdktf.FnGenerated.values(
mapping: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.yamldecode(
src: str
)
{@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
import cdktf
cdktf.FnGenerated.yamlencode(
value: typing.Any
)
{@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
import cdktf
cdktf.FnGenerated.zipmap(
keys: typing.List[str],
values: typing.Any
)
{@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
import cdktf
cdktf.Lazy()
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
import cdktf
cdktf.Lazy.any_value(
producer: IAnyProducer,
display_hint: str = None,
omit_empty_array: bool = None
)
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
import cdktf
cdktf.Lazy.list_value(
producer: IListProducer,
display_hint: str = None,
omit_empty: bool = None
)
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
import cdktf
cdktf.Lazy.number_value(
producer: INumberProducer
)
Returns a numberified token for a lazy value.
producer
Required
- Type: INumberProducer
The producer.
string_value
import cdktf
cdktf.Lazy.string_value(
producer: IStringProducer,
display_hint: str = None
)
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
import cdktf
cdktf.LazyBase()
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
def add_post_processor(
post_processor: IPostProcessor
) - > None
post_processor
Required
- Type: IPostProcessor
resolve
def resolve(
context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
context
Required
- Type: IResolveContext
to_jso_n
def to_jso_n() - > typing.Any
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
to_string
def to_string() - > str
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
creation_stack: typing.List[str]
- 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
import cdktf
cdktf.ListTerraformIterator(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > IResolvable
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
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def keys() - > IResolvable
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
def pluck_property(
property: str
) - > IResolvable
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
def values() - > IResolvable
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
import cdktf
cdktf.ListTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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
# Example automatically generated from non-compiling source. May contain errors.
cert = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
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
import cdktf
cdktf.ListTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.ListTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
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
import cdktf
cdktf.ListTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
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
import cdktf
cdktf.ListTerraformIterator.from_resources(
resource: ITerraformResource
)
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
key: typing.Any
- 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
value: typing.Any
- Type: typing.Any
Returns the value of the current item iterated over.
Manifest
- Implements: IManifest
Initializers
import cdktf
cdktf.Manifest(
version: str,
outdir: str,
hcl_output: bool
)
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
def build_manifest() - > IManifest
for_stack
def for_stack(
stack: TerraformStack
) - > StackManifest
stack
Required
- Type: TerraformStack
write_to_file
def write_to_file() - > None
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
hcl_output: bool
- Type: bool
outdir
Required
outdir: str
- Type: str
stack_file_name
Required
stack_file_name: str
- Type: str
stacks
Required
stacks: typing.Mapping[StackManifest]
- Type: typing.Mapping[StackManifest]
version
Required
version: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
fileName | str | No description. |
stackMetadataPath | str | No description. |
stacksFolder | str | No description. |
fileName
Required
fileName: str
- Type: str
stackMetadataPath
Required
stackMetadataPath: str
- Type: str
stacksFolder
Required
stacksFolder: str
- Type: str
MapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import cdktf
cdktf.MapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
MapTerraformIterator
Initializers
import cdktf
cdktf.MapTerraformIterator(
map: typing.Union[AnyMap, StringMap, NumberMap, BooleanMap, ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]]]
)
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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > IResolvable
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
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def keys() - > IResolvable
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
def pluck_property(
property: str
) - > IResolvable
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
def values() - > IResolvable
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
import cdktf
cdktf.MapTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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
# Example automatically generated from non-compiling source. May contain errors.
cert = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
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
import cdktf
cdktf.MapTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.MapTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
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
import cdktf
cdktf.MapTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
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
import cdktf
cdktf.MapTerraformIterator.from_resources(
resource: ITerraformResource
)
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
key: str
- Type: str
Returns the key of the current entry in the map that is being iterated over.
value
Required
value: typing.Any
- 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
import cdktf
cdktf.MigrateIds()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
visit | All aspects can visit an IConstruct. |
visit
def visit(
node: IConstruct
) - > None
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
import cdktf
cdktf.NamedCloudWorkspace(
name: str,
project: str = None
)
name
Required
- Type: str
project
Optional
- Type: str
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_hcl_terraform | No description. |
to_terraform
def to_terraform() - > typing.Any
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Properties
name
Required
name: str
- Type: str
project
Optional
project: str
- Type: str
NamedRemoteWorkspace
- Implements: IRemoteWorkspace
Initializers
import cdktf
cdktf.NamedRemoteWorkspace(
name: str
)
Name | Type | Description |
---|---|---|
name | str | No description. |
name
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
name | str | No description. |
name
Required
name: str
- Type: str
NumberListList
Initializers
import cdktf
cdktf.NumberListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
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
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > typing.List[typing.Union[int, float]]
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
creation_stack: typing.List[str]
- 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: str
- Type: str
NumberListMap
Initializers
import cdktf
cdktf.NumberListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > typing.List[typing.Union[int, float]]
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
creation_stack: typing.List[str]
- 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: str
- Type: str
NumberMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.NumberMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > typing.Union[int, float]
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
NumberMapList
Initializers
import cdktf
cdktf.NumberMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > NumberMap
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
creation_stack: typing.List[str]
- 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: str
- Type: str
Op
This class contains static functions for all arithmetical and logical operators in the Terraform configuration language.
Initializers
import cdktf
cdktf.Op()
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
import cdktf
cdktf.Op.add(
left: typing.Any,
right: typing.Any
)
Renders left + right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
and
import cdktf
cdktf.Op.and(
left: typing.Any,
right: typing.Any
)
Renders left && right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
div
import cdktf
cdktf.Op.div(
left: typing.Any,
right: typing.Any
)
Renders left / right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
eq
import cdktf
cdktf.Op.eq(
left: typing.Any,
right: typing.Any
)
Renders left == right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
gt
import cdktf
cdktf.Op.gt(
left: typing.Any,
right: typing.Any
)
Renders left > right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
gte
import cdktf
cdktf.Op.gte(
left: typing.Any,
right: typing.Any
)
Renders left >= right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
lt
import cdktf
cdktf.Op.lt(
left: typing.Any,
right: typing.Any
)
Renders left < right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
lte
import cdktf
cdktf.Op.lte(
left: typing.Any,
right: typing.Any
)
Renders left < = right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
mod
import cdktf
cdktf.Op.mod(
left: typing.Any,
right: typing.Any
)
Renders left % right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
mul
import cdktf
cdktf.Op.mul(
left: typing.Any,
right: typing.Any
)
Renders left * right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
negate
import cdktf
cdktf.Op.negate(
expression: typing.Any
)
Renders -expression.
expression
Required
- Type: typing.Any
neq
import cdktf
cdktf.Op.neq(
left: typing.Any,
right: typing.Any
)
Renders left != right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
not
import cdktf
cdktf.Op.not(
expression: typing.Any
)
Renders !expression.
expression
Required
- Type: typing.Any
or
import cdktf
cdktf.Op.or(
left: typing.Any,
right: typing.Any
)
Renders left || right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
sub
import cdktf
cdktf.Op.sub(
left: typing.Any,
right: typing.Any
)
Renders left - right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
PrefixedRemoteWorkspaces
- Implements: IRemoteWorkspace
Initializers
import cdktf
cdktf.PrefixedRemoteWorkspaces(
prefix: str
)
Name | Type | Description |
---|---|---|
prefix | str | No description. |
prefix
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
prefix | str | No description. |
prefix
Required
prefix: str
- Type: str
ResourceTerraformIterator
Initializers
import cdktf
cdktf.ResourceTerraformIterator(
element: ITerraformResource
)
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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > IResolvable
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
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def keys() - > IResolvable
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
def pluck_property(
property: str
) - > IResolvable
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
def values() - > IResolvable
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
import cdktf
cdktf.ResourceTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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
# Example automatically generated from non-compiling source. May contain errors.
cert = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
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
import cdktf
cdktf.ResourceTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.ResourceTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
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
import cdktf
cdktf.ResourceTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
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
import cdktf
cdktf.ResourceTerraformIterator.from_resources(
resource: ITerraformResource
)
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
key: typing.Any
- 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
value: typing.Any
- 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
import cdktf
cdktf.StringConcat()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
join | Concatenates string fragments. |
join
def join(
left: typing.Any,
right: typing.Any
) - > typing.Any
Concatenates string fragments.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
StringListList
Initializers
import cdktf
cdktf.StringListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
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
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > typing.List[str]
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
creation_stack: typing.List[str]
- 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: str
- Type: str
StringListMap
Initializers
import cdktf
cdktf.StringListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > typing.List[str]
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
creation_stack: typing.List[str]
- 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: str
- Type: str
StringMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.StringMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
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
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > str
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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: typing.List[str]
- 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: str
- Type: str
StringMapList
Initializers
import cdktf
cdktf.StringMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
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
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > StringMap
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
creation_stack: typing.List[str]
- 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: str
- 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
import cdktf
cdktf.TaggedCloudWorkspaces(
tags: typing.List[str],
project: str = None
)
tags
Required
- Type: typing.List[str]
project
Optional
- Type: str
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_hcl_terraform | No description. |
to_terraform
def to_terraform() - > typing.Any
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Properties
tags
Required
tags: typing.List[str]
- Type: typing.List[str]
project
Optional
project: str
- Type: str
TerraformCount
Iterator for the Terraform count property.
Methods
Name | Description |
---|---|
to_string | No description. |
to_terraform | No description. |
to_string
def to_string() - > str
to_terraform
def to_terraform() - > typing.Union[int, float]
Static Functions
Name | Description |
---|---|
is_terraform_count | No description. |
of | No description. |
is_terraform_count
import cdktf
cdktf.TerraformCount.is_terraform_count(
x: typing.Any
)
x
Required
- Type: typing.Any
of
import cdktf
cdktf.TerraformCount.of(
count: typing.Union[int, float]
)
count
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
index | typing.Union[int, float] | No description. |
index
Required
index: typing.Union[int, float]
- Type: typing.Union[int, float]
TerraformIterator
- Implements: ITerraformIterator
Initializers
import cdktf
cdktf.TerraformIterator()
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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > IResolvable
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
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > IResolvable
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
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def keys() - > IResolvable
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
def pluck_property(
property: str
) - > IResolvable
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
def values() - > IResolvable
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
import cdktf
cdktf.TerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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
# Example automatically generated from non-compiling source. May contain errors.
cert = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
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
import cdktf
cdktf.TerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.TerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
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
import cdktf
cdktf.TerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
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
import cdktf
cdktf.TerraformIterator.from_resources(
resource: ITerraformResource
)
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
TerraformResourceTargets
Initializers
import cdktf
cdktf.TerraformResourceTargets()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
add_resource_target | No description. |
get_resource_by_target | No description. |
add_resource_target
def add_resource_target(
resource: TerraformResource,
target: str
) - > None
resource
Required
- Type: TerraformResource
target
Required
- Type: str
get_resource_by_target
def get_resource_by_target(
target: str
) - > TerraformResource
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
import cdktf
cdktf.TerraformSelf()
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
import cdktf
cdktf.TerraformSelf.get_any(
key: str
)
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
import cdktf
cdktf.TerraformSelf.get_number(
key: str
)
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
import cdktf
cdktf.TerraformSelf.get_string(
key: str
)
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
import cdktf
cdktf.Testing()
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
import cdktf
cdktf.Testing.app(
context: typing.Mapping[typing.Any] = None,
enable_future_flags: bool = None,
fake_cdktf_json_path: bool = None,
outdir: str = None,
stack_traces: bool = None,
stub_version: bool = None
)
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
import cdktf
cdktf.Testing.enable_future_flags(
app: App
)
app
Required
- Type: App
fake_cdktf_json_path
import cdktf
cdktf.Testing.fake_cdktf_json_path(
app: App
)
app
Required
- Type: App
full_synth
import cdktf
cdktf.Testing.full_synth(
stack: TerraformStack
)
stack
Required
- Type: TerraformStack
render_construct_tree
import cdktf
cdktf.Testing.render_construct_tree(
construct: IConstruct
)
construct
Required
- Type: constructs.IConstruct
setup_jest
import cdktf
cdktf.Testing.setup_jest()
stub_version
import cdktf
cdktf.Testing.stub_version(
app: App
)
app
Required
- Type: App
synth
import cdktf
cdktf.Testing.synth(
stack: TerraformStack,
run_validations: bool = None
)
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
run_validations
Optional
- Type: bool
synth_hcl
import cdktf
cdktf.Testing.synth_hcl(
stack: TerraformStack,
run_validations: bool = None,
return_metadata: bool = None
)
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
run_validations
Optional
- Type: bool
return_metadata
Optional
- Type: bool
synth_scope
import cdktf
cdktf.Testing.synth_scope(
fn: IScopeCallback
)
fn
Required
- Type: IScopeCallback
to_be_valid_terraform
import cdktf
cdktf.Testing.to_be_valid_terraform(
received: str
)
received
Required
- Type: str
to_have_data_source
import cdktf
cdktf.Testing.to_have_data_source(
received: str,
resource_type: str
)
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_data_source_with_properties
import cdktf
cdktf.Testing.to_have_data_source_with_properties(
received: str,
resource_type: str,
properties: typing.Mapping[typing.Any] = None
)
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
to_have_provider
import cdktf
cdktf.Testing.to_have_provider(
received: str,
resource_type: str
)
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_provider_with_properties
import cdktf
cdktf.Testing.to_have_provider_with_properties(
received: str,
resource_type: str,
properties: typing.Mapping[typing.Any] = None
)
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
to_have_resource
import cdktf
cdktf.Testing.to_have_resource(
received: str,
resource_type: str
)
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_resource_with_properties
import cdktf
cdktf.Testing.to_have_resource_with_properties(
received: str,
resource_type: str,
properties: typing.Mapping[typing.Any] = None
)
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
import cdktf
cdktf.Token()
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
import cdktf
cdktf.Token.as_any(
value: typing.Any
)
Return a resolvable representation of the given value.
value
Required
- Type: typing.Any
as_any_map
import cdktf
cdktf.Token.as_any_map(
value: typing.Any,
display_hint: str = None
)
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
import cdktf
cdktf.Token.as_boolean_map(
value: typing.Any,
display_hint: str = None
)
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
import cdktf
cdktf.Token.as_list(
value: typing.Any,
display_hint: str = None
)
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
import cdktf
cdktf.Token.as_map(
value: typing.Any,
map_value: typing.Any,
display_hint: str = None
)
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
import cdktf
cdktf.Token.as_number(
value: typing.Any
)
Return a reversible number representation of this token.
value
Required
- Type: typing.Any
as_number_list
import cdktf
cdktf.Token.as_number_list(
value: typing.Any
)
Return a reversible list representation of this token.
value
Required
- Type: typing.Any
as_number_map
import cdktf
cdktf.Token.as_number_map(
value: typing.Any,
display_hint: str = None
)
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
import cdktf
cdktf.Token.as_string(
value: typing.Any,
display_hint: str = None
)
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
import cdktf
cdktf.Token.as_string_map(
value: typing.Any,
display_hint: str = None
)
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
import cdktf
cdktf.Token.is_unresolved(
obj: typing.Any
)
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
import cdktf
cdktf.Token.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
ANY_MAP_TOKEN_VALUE: str
- Type: str
Any map token representation.
NUMBER_MAP_TOKEN_VALUE
Required
NUMBER_MAP_TOKEN_VALUE: typing.Union[int, float]
- Type: typing.Union[int, float]
Number Map token value representation.
STRING_MAP_TOKEN_VALUE
Required
STRING_MAP_TOKEN_VALUE: str
- Type: str
String Map token value representation.
Tokenization
Less oft-needed functions to manipulate Tokens.
Initializers
import cdktf
cdktf.Tokenization()
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
import cdktf
cdktf.Tokenization.is_resolvable(
obj: typing.Any
)
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
import cdktf
cdktf.Tokenization.resolve(
obj: typing.Any,
resolver: ITokenResolver,
scope: IConstruct,
preparing: bool = None
)
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
import cdktf
cdktf.Tokenization.reverse(
x: typing.Any
)
Reverse any value into Resolvables, if possible.
x
Required
- Type: typing.Any
reverse_list
import cdktf
cdktf.Tokenization.reverse_list(
l: typing.List[str]
)
Un-encode a Tokenized value from a list.
l
Required
- Type: typing.List[str]
reverse_map
import cdktf
cdktf.Tokenization.reverse_map(
m: typing.Mapping[typing.Any]
)
Un-encode a Tokenized value from a map.
m
Required
- Type: typing.Mapping[typing.Any]
reverse_number
import cdktf
cdktf.Tokenization.reverse_number(
n: typing.Union[int, float]
)
Un-encode a Tokenized value from a number.
n
Required
- Type: typing.Union[int, float]
reverse_number_list
import cdktf
cdktf.Tokenization.reverse_number_list(
l: typing.List[typing.Union[int, float]]
)
Un-encode a Tokenized value from a list.
l
Required
- Type: typing.List[typing.Union[int, float]]
reverse_string
import cdktf
cdktf.Tokenization.reverse_string(
s: str
)
Un-encode a string potentially containing encoded tokens.
s
Required
- Type: str
stringify_number
import cdktf
cdktf.Tokenization.stringify_number(
x: typing.Union[int, float]
)
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
import cdktf
cdktf.TokenizedStringFragments()
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
def add_escape(
kind: str
) - > None
kind
Required
- Type: str
add_intrinsic
def add_intrinsic(
value: typing.Any
) - > None
Adds an intrinsic fragment.
value
Required
- Type: typing.Any
the intrinsic value to add.
add_literal
def add_literal(
lit: typing.Any
) - > None
Adds a literal fragment.
lit
Required
- Type: typing.Any
the literal to add.
add_token
def add_token(
token: IResolvable
) - > None
Adds a token fragment.
token
Required
- Type: IResolvable
the token to add.
concat
def concat(
other: TokenizedStringFragments
) - > None
other
Required
- Type: TokenizedStringFragments
join
def join(
concat: IFragmentConcatenator
) - > typing.Any
Combine the string fragments using the given joiner.
If there are any
concat
Required
- Type: IFragmentConcatenator
map_tokens
def map_tokens(
context: IResolveContext
) - > TokenizedStringFragments
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
escapes: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all escape fragments from this string.
first_value
Required
first_value: typing.Any
- Type: typing.Any
Returns the first value.
intrinsic
Required
intrinsic: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all intrinsic fragments from this string.
length
Required
length: typing.Union[int, float]
- Type: typing.Union[int, float]
Returns the number of fragments.
literals
Required
literals: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all literals from this string.
tokens
Required
tokens: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all Tokens from this string.
first_token
Optional
first_token: IResolvable
- Type: IResolvable
Returns the first token.
VariableType
Initializers
import cdktf
cdktf.VariableType()
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
list | No description. |
map | No description. |
object | No description. |
set | No description. |
tuple | No description. |
list
import cdktf
cdktf.VariableType.list(
type: str
)
type
Required
- Type: str
map
import cdktf
cdktf.VariableType.map(
type: str
)
type
Required
- Type: str
object
import cdktf
cdktf.VariableType.object(
attributes: typing.Mapping[str]
)
attributes
Required
- Type: typing.Mapping[str]
set
import cdktf
cdktf.VariableType.set(
type: str
)
type
Required
- Type: str
tuple
import cdktf
cdktf.VariableType.tuple(
elements: str
)
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
ANY: str
- Type: str
BOOL
Required
BOOL: str
- Type: str
LIST
Required
LIST: str
- Type: str
LIST_BOOL
Required
LIST_BOOL: str
- Type: str
LIST_NUMBER
Required
LIST_NUMBER: str
- Type: str
LIST_STRING
Required
LIST_STRING: str
- Type: str
MAP
Required
MAP: str
- Type: str
MAP_BOOL
Required
MAP_BOOL: str
- Type: str
MAP_NUMBER
Required
MAP_NUMBER: str
- Type: str
MAP_STRING
Required
MAP_STRING: str
- Type: str
NUMBER
Required
NUMBER: str
- Type: str
SET
Required
SET: str
- Type: str
SET_BOOL
Required
SET_BOOL: str
- Type: str
SET_NUMBER
Required
SET_NUMBER: str
- Type: str
SET_STRING
Required
SET_STRING: str
- Type: str
STRING
Required
STRING: str
- Type: str
Protocols
IAnyProducer
- Implemented By: IAnyProducer
Interface for lazy untyped value producers.
Methods
Name | Description |
---|---|
produce | Produce the value. |
produce
def produce(
context: IResolveContext
) - > typing.Any
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
def visit(
node: IConstruct
) - > None
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
def join(
left: typing.Any,
right: typing.Any
) - > typing.Any
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
import_id: str
- Type: str
terraform_resource_type
Required
terraform_resource_type: str
- Type: str
provider
Optional
provider: TerraformProvider
- 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
def interpolation_for_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
IListProducer
- Implemented By: IListProducer
Interface for lazy list producers.
Methods
Name | Description |
---|---|
produce | Produce the list value. |
produce
def produce(
context: IResolveContext
) - > typing.List[str]
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
stacks: typing.Mapping[StackManifest]
- Type: typing.Mapping[StackManifest]
version
Required
version: str
- Type: str
INumberProducer
- Implemented By: INumberProducer
Interface for lazy number producers.
Methods
Name | Description |
---|---|
produce | Produce the number value. |
produce
def produce(
context: IResolveContext
) - > typing.Union[int, float]
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
def post_process(
input: typing.Any,
context: IResolveContext
) - > typing.Any
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
def resolve(
context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
context
Required
- Type: IResolveContext
to_string
def to_string() - > str
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
creation_stack: typing.List[str]
- 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
def register_post_processor(
post_processor: IPostProcessor
) - > None
Use this postprocessor after the entire token structure has been resolved.
post_processor
Required
- Type: IPostProcessor
resolve
def resolve(
x: typing.Any
) - > typing.Any
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
preparing: bool
- Type: bool
True when we are still preparing, false if we're rendering the final output.
scope
Required
scope: IConstruct
- Type: constructs.IConstruct
The scope from which resolution has been initiated.
ignore_escapes
Optional
ignore_escapes: bool
- Type: bool
True when ${} should not be parsed, and treated as literals.
iterator_context
Optional
iterator_context: str
- 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
suppress_braces: bool
- Type: bool
True when ${} should be ommitted (because already inside them), false otherwise.
warn_escapes
Optional
warn_escapes: bool
- 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
node: Node
- Type: constructs.Node
The tree node.
stack
Required
stack: TerraformStack
- 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
def synthesize(
session: ISynthesisSession
) - > None
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
def produce(
context: IResolveContext
) - > str
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
manifest: Manifest
- Type: Manifest
outdir
Required
outdir: str
- Type: str
The output directory for this synthesis session.
skip_validation
Optional
skip_validation: bool
- 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
fqn: str
- Type: str
ITerraformDependable
Extends: ITerraformAddressable
Implemented By: DataResource, TerraformDataSource, TerraformHclModule, TerraformModule, TerraformResource, ITerraformDependable
Properties
Name | Type | Description |
---|---|---|
fqn | str | No description. |
fqn
Required
fqn: str
- 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
def interpolation_for_attribute(
terraform_attribute: str
) - > IResolvable
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
fqn: str
- Type: str
friendly_unique_id
Required
friendly_unique_id: str
- Type: str
terraform_resource_type
Required
terraform_resource_type: str
- Type: str
count
Optional
count: typing.Union[typing.Union[int, float], TerraformCount]
- Type: typing.Union[typing.Union[int, float], TerraformCount]
depends_on
Optional
depends_on: typing.List[str]
- Type: typing.List[str]
for_each
Optional
for_each: ITerraformIterator
- Type: ITerraformIterator
lifecycle
Optional
lifecycle: TerraformResourceLifecycle
provider
Optional
provider: TerraformProvider
- 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
def map_token(
t: IResolvable
) - > typing.Any
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
def resolve_list(
l: typing.List[str],
context: IResolveContext
) - > typing.Any
Resolve a tokenized list.
l
Required
- Type: typing.List[str]
context
Required
- Type: IResolveContext
resolve_map
def resolve_map(
m: typing.Mapping[typing.Any],
context: IResolveContext
) - > typing.Any
Resolve a tokenized map.
m
Required
- Type: typing.Mapping[typing.Any]
context
Required
- Type: IResolveContext
resolve_number_list
def resolve_number_list(
l: typing.List[typing.Union[int, float]],
context: IResolveContext
) - > typing.Any
Resolve a tokenized number list.
l
Required
- Type: typing.List[typing.Union[int, float]]
context
Required
- Type: IResolveContext
resolve_string
def resolve_string(
s: TokenizedStringFragments,
context: IResolveContext
) - > typing.Any
Resolve a string with at least one stringified token in it.
(May use concatenation)
s
Required
- Type: TokenizedStringFragments
context
Required
- Type: IResolveContext
resolve_token
def resolve_token(
t: IResolvable,
context: IResolveContext,
post_processor: IPostProcessor
) - > typing.Any
Resolve a single token.
t
Required
- Type: IResolvable
context
Required
- Type: IResolveContext
post_processor
Required
- Type: IPostProcessor