Terraform
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: typing.List[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: typing.List[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 | typing.List[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 | typing.List[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: typing.List[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: typing.List[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: typing.List[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: typing.List[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 | typing.List[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 | typing.List[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: typing.List[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: typing.List[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]