API Reference for Java
Constructs
App
Represents a cdktf application.
Initializers
Name | Type | Description |
---|---|---|
context | java.util.Map< java.lang.String, java.lang.Object > | Additional context values for the application. |
outdir | java.lang.String | The directory to output Terraform resources. |
skipBackendValidation | java.lang.Boolean | Whether to skip backend validation during synthesis of the app. |
skipValidation | java.lang.Boolean | Whether to skip all validations during synthesis of the app. |
stackTraces | java.lang.Boolean | No description. |
context
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
- 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)
.
outdir
Optional
- Type: java.lang.String
- Default: CDKTF_OUTDIR if defined, otherwise "cdktf.out"
The directory to output Terraform resources.
skipBackendValidation
Optional
- Type: java.lang.Boolean
- Default: false
Whether to skip backend validation during synthesis of the app.
skipValidation
Optional
- Type: java.lang.Boolean
- Default: false
Whether to skip all validations during synthesis of the app.
stackTraces
Optional
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
crossStackReference | Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources. |
synth | Synthesizes all resources to the output directory. |
toString
Returns a string representation of this construct.
crossStackReference
Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources.
fromStack
Required
- Type: TerraformStack
toStack
Required
- Type: TerraformStack
identifier
Required
- Type: java.lang.String
synth
Synthesizes all resources to the output directory.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isApp | No description. |
of | No description. |
isConstruct
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: java.lang.Object
Any object.
isApp
x
Required
- Type: java.lang.Object
of
construct
Required
- Type: software.constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
manifest | Manifest | No description. |
outdir | java.lang.String | The output directory into which resources will be synthesized. |
skipBackendValidation | java.lang.Boolean | Whether to skip backend validation during synthesis of the app. |
skipValidation | java.lang.Boolean | Whether to skip all validations during synthesis of the app. |
targetStackId | java.lang.String | The stack which will be synthesized. |
node
Required
- Type: software.constructs.Node
The tree node.
manifest
Required
- Type: Manifest
outdir
Required
- Type: java.lang.String
The output directory into which resources will be synthesized.
skipBackendValidation
Required
- Type: java.lang.Boolean
Whether to skip backend validation during synthesis of the app.
skipValidation
Required
- Type: java.lang.Boolean
Whether to skip all validations during synthesis of the app.
targetStackId
Optional
- Type: java.lang.String
The stack which will be synthesized.
If not set, all stacks will be synthesized.
ArtifactoryBackend
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
password | java.lang.String | (Required) - The password. |
repo | java.lang.String | (Required) - The repository name. |
subpath | java.lang.String | (Required) - Path within the repository. |
url | java.lang.String | (Required) - The URL. |
username | java.lang.String | (Required) - The username. |
scope
Required
- Type: software.constructs.Construct
password
Required
password
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The password.
repo
Required
repo
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The repository name.
subpath
Required
subpath
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - Path within the repository.
url
Required
url
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The URL.
Note that this is the base url to artifactory not the full repo and subpath.
username
Required
username
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The username.
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
toString
Returns a string representation of this construct.
addOverride
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toMetadata
toTerraform
toTerraform
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
getRemoteStateDataSource
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: software.constructs.Construct
name
Required
- Type: java.lang.String
_fromStack
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isBackend | No description. |
isConstruct
isConstruct
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: java.lang.Object
Any object.
isTerraformElement
isTerraformElement
x
Required
- Type: java.lang.Object
isBackend
isBackend
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
node
Required
node
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
cdktfStack
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: TerraformStack
fqn
Required
fqn
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: java.lang.String
friendlyUniqueId
Required
friendlyUniqueId
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: java.lang.String
AzurermBackend
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
containerName | java.lang.String | (Required) The Name of the Storage Container within the Storage Account. |
key | java.lang.String | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storageAccountName | java.lang.String | (Required) The Name of the Storage Account. |
accessKey | java.lang.String | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
clientCertificatePassword | java.lang.String | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
clientCertificatePath | java.lang.String | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
clientId | java.lang.String | (Optional) The Client ID of the Service Principal. |
clientSecret | java.lang.String | (Optional) The Client Secret of the Service Principal. |
endpoint | java.lang.String | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | java.lang.String | (Optional) The Azure Environment which should be used. |
msiEndpoint | java.lang.String | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidcRequestToken | java.lang.String | (Optional) The bearer token for the request to the OIDC provider. |
oidcRequestUrl | java.lang.String | (Optional) The URL for the OIDC provider from which to request an ID token. |
resourceGroupName | java.lang.String | (Required) The Name of the Resource Group in which the Storage Account exists. |
sasToken | java.lang.String | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | java.lang.Boolean | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscriptionId | java.lang.String | (Optional) The Subscription ID in which the Storage Account exists. |
tenantId | java.lang.String | (Optional) The Tenant ID in which the Subscription exists. |
useAzureadAuth | java.lang.Boolean | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
useMicrosoftGraph | java.lang.Boolean | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
useMsi | java.lang.Boolean | (Optional) Should Managed Service Identity authentication be used? |
useOidc | java.lang.Boolean | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
scope
Required
- Type: software.constructs.Construct
containerName
Required
- Type: java.lang.String
(Required) The Name of the Storage Container within the Storage Account.
key
Required
- Type: java.lang.String
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storageAccountName
Required
- Type: java.lang.String
(Required) The Name of the Storage Account.
accessKey
Optional
- Type: java.lang.String
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.
clientCertificatePassword
Optional
- Type: java.lang.String
(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.
clientCertificatePath
Optional
- Type: java.lang.String
(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.
clientId
Optional
- Type: java.lang.String
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
clientSecret
Optional
- Type: java.lang.String
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
- Type: java.lang.String
(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: java.lang.String
(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.
msiEndpoint
Optional
- Type: java.lang.String
(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.
oidcRequestToken
Optional
- Type: java.lang.String
(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.
oidcRequestUrl
Optional
- Type: java.lang.String
(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.
resourceGroupName
Optional
- Type: java.lang.String
(Required) The Name of the Resource Group in which the Storage Account exists.
sasToken
Optional
- Type: java.lang.String
(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: java.lang.Boolean
(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.
subscriptionId
Optional
- Type: java.lang.String
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenantId
Optional
- Type: java.lang.String
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
useAzureadAuth
Optional
- Type: java.lang.Boolean
(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.
useMicrosoftGraph
Optional
- Type: java.lang.Boolean
(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.
useMsi
Optional
- Type: java.lang.Boolean
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
useOidc
Optional
- Type: java.lang.Boolean
(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 |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
Returns a string representation of this construct.
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toTerraform
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: software.constructs.Construct
name
Required
- Type: java.lang.String
_fromStack
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isBackend | No description. |
isConstruct
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: java.lang.Object
Any object.
isTerraformElement
x
Required
- Type: java.lang.Object
isBackend
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
node
Required
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
- Type: TerraformStack
fqn
Required
- Type: java.lang.String
friendlyUniqueId
Required
- Type: java.lang.String
CloudBackend
The Cloud Backend synthesizes a {@link https://developer.hashicorp.com/terraform/cli/cloud/settings#the-cloud-block cloud block}. The cloud block is a nested block within the top-level terraform settings block. It specifies which Terraform Cloud workspaces to use for the current working directory. The cloud block only affects Terraform CLI's behavior. When Terraform Cloud uses a configuration that contains a cloud block - for example, when a workspace is configured to use a VCS provider directly - it ignores the block and behaves according to its own workspace settings.
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
organization | java.lang.String | The name of the organization containing the workspace(s) the current configuration should use. |
workspaces | NamedCloudWorkspace OR TaggedCloudWorkspaces | A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration. |
hostname | java.lang.String | The hostname of a Terraform Enterprise installation, if using Terraform Enterprise. |
token | java.lang.String | The token used to authenticate with Terraform Cloud. |
scope
Required
- Type: software.constructs.Construct
organization
Required
- Type: java.lang.String
The name of the organization containing the workspace(s) the current configuration should use.
workspaces
Required
- Type: NamedCloudWorkspace OR 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: java.lang.String
- Default: app.terraform.io
The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.
token
Optional
- Type: java.lang.String
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 |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
Returns a string representation of this construct.
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toTerraform
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: software.constructs.Construct
name
Required
- Type: java.lang.String
_fromStack
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isBackend | No description. |
isConstruct
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: java.lang.Object
Any object.
isTerraformElement
x
Required
- Type: java.lang.Object
isBackend
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
node
Required
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
- Type: TerraformStack
fqn
Required
- Type: java.lang.String
friendlyUniqueId
Required
- Type: java.lang.String
ConsulBackend
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
accessToken | java.lang.String | (Required) Access token. |
path | java.lang.String | (Required) Path in the Consul KV store. |
address | java.lang.String | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
caFile | java.lang.String | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
certFile | java.lang.String | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
datacenter | java.lang.String | (Optional) The datacenter to use. |
gzip | java.lang.Boolean | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
httpAuth | java.lang.String | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
keyFile | java.lang.String | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
lock | java.lang.Boolean | (Optional) false to disable locking. |
scheme | java.lang.String | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
scope
Required
- Type: software.constructs.Construct
accessToken
Required
- Type: java.lang.String
(Required) Access token.
path
Required
- Type: java.lang.String
(Required) Path in the Consul KV store.
address
Optional
- Type: java.lang.String
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
caFile
Optional
- Type: java.lang.String
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
certFile
Optional
- Type: java.lang.String
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenter
Optional
- Type: java.lang.String
(Optional) The datacenter to use.
Defaults to that of the agent.
gzip
Optional
- Type: java.lang.Boolean
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
httpAuth
Optional
- Type: java.lang.String
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
keyFile
Optional
- Type: java.lang.String
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lock
Optional
- Type: java.lang.Boolean
(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: java.lang.String
(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 |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
Returns a string representation of this construct.
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toTerraform
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: software.constructs.Construct
name
Required
- Type: java.lang.String
_fromStack
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isBackend | No description. |
isConstruct
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: java.lang.Object
Any object.
isTerraformElement
x
Required
- Type: java.lang.Object
isBackend
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
node
Required
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
- Type: TerraformStack
fqn
Required
- Type: java.lang.String
friendlyUniqueId
Required
- Type: java.lang.String
CosBackend
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
bucket | java.lang.String | (Required) The name of the COS bucket. |
acl | java.lang.String | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
encrypt | java.lang.Boolean | (Optional) Whether to enable server side encryption of the state file. |
key | java.lang.String | (Optional) The path for saving the state file in bucket. |
prefix | java.lang.String | (Optional) The directory for saving the state file in bucket. |
region | java.lang.String | (Optional) The region of the COS bucket. |
secretId | java.lang.String | (Optional) Secret id of Tencent Cloud. |
secretKey | java.lang.String | (Optional) Secret key of Tencent Cloud. |
scope
Required
- Type: software.constructs.Construct
bucket
Required
- Type: java.lang.String
(Required) The name of the COS bucket.
You shall manually create it first.
acl
Optional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
encrypt
Optional
- Type: java.lang.Boolean
(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.
key
Optional
- Type: java.lang.String
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefix
Optional
- Type: java.lang.String
(Optional) The directory for saving the state file in bucket.
Default to "env:".
region
Optional
- Type: java.lang.String
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secretId
Optional
- Type: java.lang.String
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secretKey
Optional
- Type: java.lang.String
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
Returns a string representation of this construct.
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toTerraform
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: software.constructs.Construct
name
Required
- Type: java.lang.String
_fromStack
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isBackend | No description. |
isConstruct
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: java.lang.Object
Any object.
isTerraformElement
x
Required
- Type: java.lang.Object
isBackend
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
node
Required
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
- Type: TerraformStack
fqn
Required
- Type: java.lang.String
friendlyUniqueId
Required
- Type: java.lang.String
DataTerraformRemoteState
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
defaults | java.util.Map< java.lang.String, java.lang.Object > | No description. |
workspace | java.lang.String | No description. |
organization | java.lang.String | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | java.lang.String | No description. |
token | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
defaults
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspace
Optional
- Type: java.lang.String
organization
Required
- Type: java.lang.String
workspaces
Required
- Type: IRemoteWorkspace
hostname
Optional
- Type: java.lang.String
token
Optional
- Type: java.lang.String
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
Returns a string representation of this construct.
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toTerraform
Adds this resource to the terraform JSON output.
get
output
Required
- Type: java.lang.String
getBoolean
output
Required
- Type: java.lang.String
getList
output
Required
- Type: java.lang.String
getNumber
output
Required
- Type: java.lang.String
getString
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
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: java.lang.Object
Any object.
isTerraformElement
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
node
Required
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
- Type: TerraformStack
fqn
Required
- Type: java.lang.String
friendlyUniqueId
Required
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
- Type: java.lang.String
DataTerraformRemoteStateArtifactory
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
defaults | java.util.Map< java.lang.String, java.lang.Object > | No description. |
workspace | java.lang.String | No description. |
password | java.lang.String | (Required) - The password. |
repo | java.lang.String | (Required) - The repository name. |
subpath | java.lang.String | (Required) - Path within the repository. |
url | java.lang.String | (Required) - The URL. |
username | java.lang.String | (Required) - The username. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
defaults
Optional
defaults
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.util.Map< java.lang.String, java.lang.Object >
workspace
Optional
workspace
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
password
Required
password
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The password.
repo
Required
repo
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The repository name.
subpath
Required
subpath
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - Path within the repository.
url
Required
url
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The URL.
Note that this is the base url to artifactory not the full repo and subpath.
username
Required
username
Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
Type: java.lang.String
(Required) - The username.
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
toString
Returns a string representation of this construct.
addOverride
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toMetadata
toTerraform
toTerraform
Adds this resource to the terraform JSON output.
get
get
output
Required
- Type: java.lang.String
getBoolean
getBoolean
output
Required
- Type: java.lang.String
getList
getList
output
Required
- Type: java.lang.String
getNumber
getNumber
output
Required
- Type: java.lang.String
getString
getString
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
isConstruct
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: java.lang.Object
Any object.
isTerraformElement
isTerraformElement
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
node
Required
node
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
cdktfStack
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: TerraformStack
fqn
Required
fqn
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: java.lang.String
friendlyUniqueId
Required
friendlyUniqueId
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
tfResourceType
- Deprecated: CDK for Terraform no longer supports the artifactory backend. Terraform deprecated artifactory in v1.2.3 and removed it in v1.3.
- Type: java.lang.String
DataTerraformRemoteStateAzurerm
Initializers
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
defaults | java.util.Map< java.lang.String, java.lang.Object > | No description. |
workspace | java.lang.String | No description. |
containerName | java.lang.String | (Required) The Name of the Storage Container within the Storage Account. |
key | java.lang.String | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storageAccountName | java.lang.String | (Required) The Name of the Storage Account. |
accessKey | java.lang.String | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
clientCertificatePassword | java.lang.String | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
clientCertificatePath | java.lang.String | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
clientId | java.lang.String | (Optional) The Client ID of the Service Principal. |
clientSecret | java.lang.String | (Optional) The Client Secret of the Service Principal. |
endpoint | java.lang.String | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | java.lang.String | (Optional) The Azure Environment which should be used. |
msiEndpoint | java.lang.String | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidcRequestToken | java.lang.String | (Optional) The bearer token for the request to the OIDC provider. |
oidcRequestUrl | java.lang.String | (Optional) The URL for the OIDC provider from which to request an ID token. |
resourceGroupName | java.lang.String | (Required) The Name of the Resource Group in which the Storage Account exists. |
sasToken | java.lang.String | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | java.lang.Boolean | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscriptionId | java.lang.String | (Optional) The Subscription ID in which the Storage Account exists. |
tenantId | java.lang.String | (Optional) The Tenant ID in which the Subscription exists. |
useAzureadAuth | java.lang.Boolean | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
useMicrosoftGraph | java.lang.Boolean | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
useMsi | java.lang.Boolean | (Optional) Should Managed Service Identity authentication be used? |
useOidc | java.lang.Boolean | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
defaults
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspace
Optional
- Type: java.lang.String
containerName
Required
- Type: java.lang.String
(Required) The Name of the Storage Container within the Storage Account.
key
Required
- Type: java.lang.String
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storageAccountName
Required
- Type: java.lang.String
(Required) The Name of the Storage Account.
accessKey
Optional
- Type: java.lang.String
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.
clientCertificatePassword
Optional
- Type: java.lang.String
(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.
clientCertificatePath
Optional
- Type: java.lang.String
(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.
clientId
Optional
- Type: java.lang.String
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
clientSecret
Optional
- Type: java.lang.String
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpoint
Optional
- Type: java.lang.String
(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: java.lang.String
(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.
msiEndpoint
Optional
- Type: java.lang.String
(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.
oidcRequestToken
Optional
- Type: java.lang.String
(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.
oidcRequestUrl
Optional
- Type: java.lang.String
(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.
resourceGroupName
Optional
- Type: java.lang.String
(Required) The Name of the Resource Group in which the Storage Account exists.
sasToken
Optional
- Type: java.lang.String
(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: java.lang.Boolean
(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.
subscriptionId
Optional
- Type: java.lang.String
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenantId
Optional
- Type: java.lang.String
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
useAzureadAuth
Optional
- Type: java.lang.Boolean
(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.
useMicrosoftGraph
Optional
- Type: java.lang.Boolean
(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.
useMsi
Optional
- Type: java.lang.Boolean
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
useOidc
Optional
- Type: java.lang.Boolean
(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 |
---|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
Returns a string representation of this construct.
addOverride
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
toTerraform
Adds this resource to the terraform JSON output.