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,