Terraform
Java: Constructs
App
Represents a cdktf application.
Initializers
import com.hashicorp.cdktf.App;
App.Builder.create()
// .context(java.util.Map< java.lang.String, java.lang.Object >)
// .hclOutput(java.lang.Boolean)
// .outdir(java.lang.String)
// .skipBackendValidation(java.lang.Boolean)
// .skipValidation(java.lang.Boolean)
// .stackTraces(java.lang.Boolean)
.build();
Name | Type | Description |
---|---|---|
context | java.util.Map< java.lang.String, java.lang.Object > | Additional context values for the application. |
hclOutput | java.lang.Boolean | No description. |
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)
.
hclOutput
Optional
- Type: java.lang.Boolean
outdir
Optional
- Type: java.lang.String
- 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).
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
public java.lang.String toString()
Returns a string representation of this construct.
crossStackReference
public java.lang.String crossStackReference(TerraformStack fromStack, TerraformStack toStack, java.lang.String identifier)
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
public void 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
import com.hashicorp.cdktf.App;
App.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.App;
App.isApp(java.lang.Object x)
x
Required
- Type: java.lang.Object
of
import com.hashicorp.cdktf.App;
App.of(IConstruct construct)
construct
Required
- Type: software.constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
hclOutput | java.lang.Boolean | No description. |
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
hclOutput
Required
public java.lang.Boolean getHclOutput();
- Type: java.lang.Boolean
manifest
Required
public Manifest getManifest();
- Type: Manifest
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
The output directory into which resources will be synthesized.
skipBackendValidation
Required
public java.lang.Boolean getSkipBackendValidation();
- Type: java.lang.Boolean
Whether to skip backend validation during synthesis of the app.
skipValidation
Required
public java.lang.Boolean getSkipValidation();
- Type: java.lang.Boolean
Whether to skip all validations during synthesis of the app.
targetStackId
Optional
public java.lang.String getTargetStackId();
- Type: java.lang.String
The stack which will be synthesized.
If not set, all stacks will be synthesized.
AzurermBackend
Initializers
import com.hashicorp.cdktf.AzurermBackend;
AzurermBackend.Builder.create(Construct scope)
.containerName(java.lang.String)
.key(java.lang.String)
.storageAccountName(java.lang.String)
// .accessKey(java.lang.String)
// .clientCertificatePassword(java.lang.String)
// .clientCertificatePath(java.lang.String)
// .clientId(java.lang.String)
// .clientSecret(java.lang.String)
// .endpoint(java.lang.String)
// .environment(java.lang.String)
// .metadataHost(java.lang.String)
// .msiEndpoint(java.lang.String)
// .oidcRequestToken(java.lang.String)
// .oidcRequestUrl(java.lang.String)
// .oidcToken(java.lang.String)
// .oidcTokenFilePath(java.lang.String)
// .resourceGroupName(java.lang.String)
// .sasToken(java.lang.String)
// .snapshot(java.lang.Boolean)
// .subscriptionId(java.lang.String)
// .tenantId(java.lang.String)
// .useAzureadAuth(java.lang.Boolean)
// .useMicrosoftGraph(java.lang.Boolean)
// .useMsi(java.lang.Boolean)
// .useOidc(java.lang.Boolean)
.build();
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. |
metadataHost | java.lang.String | (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.). |
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. |
oidcToken | java.lang.String | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
oidcTokenFilePath | java.lang.String | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
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.
metadataHost
Optional
- Type: java.lang.String
(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.).
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.
oidcToken
Optional
- Type: java.lang.String
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
oidcTokenFilePath
Optional
- Type: java.lang.String
(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.
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.AzurermBackend;
AzurermBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.AzurermBackend;
AzurermBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.AzurermBackend;
AzurermBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- 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
import com.hashicorp.cdktf.CloudBackend;
CloudBackend.Builder.create(Construct scope)
.organization(java.lang.String)
.workspaces(NamedCloudWorkspace)
.workspaces(TaggedCloudWorkspaces)
// .hostname(java.lang.String)
// .token(java.lang.String)
.build();
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.CloudBackend;
CloudBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.CloudBackend;
CloudBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.CloudBackend;
CloudBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
ConsulBackend
Initializers
import com.hashicorp.cdktf.ConsulBackend;
ConsulBackend.Builder.create(Construct scope)
.accessToken(java.lang.String)
.path(java.lang.String)
// .address(java.lang.String)
// .caFile(java.lang.String)
// .certFile(java.lang.String)
// .datacenter(java.lang.String)
// .gzip(java.lang.Boolean)
// .httpAuth(java.lang.String)
// .keyFile(java.lang.String)
// .lock(java.lang.Boolean)
// .scheme(java.lang.String)
.build();
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.ConsulBackend;
ConsulBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.ConsulBackend;
ConsulBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.ConsulBackend;
ConsulBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
CosBackend
Initializers
import com.hashicorp.cdktf.CosBackend;
CosBackend.Builder.create(Construct scope)
.bucket(java.lang.String)
// .accelerate(java.lang.Boolean)
// .acl(java.lang.String)
// .assumeRole(CosBackendAssumeRole)
// .domain(java.lang.String)
// .encrypt(java.lang.Boolean)
// .endpoint(java.lang.String)
// .key(java.lang.String)
// .prefix(java.lang.String)
// .region(java.lang.String)
// .secretId(java.lang.String)
// .secretKey(java.lang.String)
// .securityToken(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
bucket | java.lang.String | (Required) The name of the COS bucket. |
accelerate | java.lang.Boolean | (Optional) Whether to enable global Acceleration. |
acl | java.lang.String | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
assumeRole | CosBackendAssumeRole | (Optional) The assume_role block. |
domain | java.lang.String | (Optional) The root domain of the API request. |
encrypt | java.lang.Boolean | (Optional) Whether to enable server side encryption of the state file. |
endpoint | java.lang.String | (Optional) The Custom Endpoint for the COS backend. |
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. |
securityToken | java.lang.String | (Optional) TencentCloud Security Token of temporary access credentials. |
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.
accelerate
Optional
- Type: java.lang.Boolean
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assumeRole
Optional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
- Type: java.lang.String
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
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.
endpoint
Optional
- Type: java.lang.String
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
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.
securityToken
Optional
- Type: java.lang.String
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.CosBackend;
CosBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.CosBackend;
CosBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.CosBackend;
CosBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
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 com.hashicorp.cdktf.DataResource;
DataResource.Builder.create(Construct scope, java.lang.String id)
// .connection(SSHProvisionerConnection)
// .connection(WinrmProvisionerConnection)
// .count(java.lang.Number)
// .count(TerraformCount)
// .dependsOn(java.util.List< ITerraformDependable >)
// .forEach(ITerraformIterator)
// .lifecycle(TerraformResourceLifecycle)
// .provider(TerraformProvider)
// .provisioners(java.util.List< FileProvisioner)
// .provisioners(LocalExecProvisioner)
// .provisioners(RemoteExecProvisioner >)
// .input(java.util.Map< java.lang.String, java.lang.Object >)
// .triggersReplace(java.util.Map< java.lang.String, java.lang.Object >)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | The scope in which to define this construct. |
id | java.lang.String | The scoped construct ID. |
connection | SSHProvisionerConnection OR WinrmProvisionerConnection | No description. |
count | java.lang.Number OR TerraformCount | No description. |
dependsOn | java.util.List< ITerraformDependable> | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner> | No description. |
input | java.util.Map< java.lang.String, java.lang.Object > | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
triggersReplace | java.util.Map< java.lang.String, java.lang.Object > | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
scope
Required
- Type: software.constructs.Construct
The scope in which to define this construct.
id
Required
- Type: java.lang.String
The scoped construct ID.
Must be unique amongst siblings in the same scope
connection
Optional
count
Optional
- Type: java.lang.Number OR TerraformCount
dependsOn
Optional
- Type: java.util.List< ITerraformDependable>
forEach
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
input
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
(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
triggersReplace
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
(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 |
---|---|
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
addMoveTarget | Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
hasResourceMove | No description. |
importFrom | No description. |
interpolationForAttribute | No description. |
moveFromId | Move the resource corresponding to "id" to this resource. |
moveTo | Moves this resource to the target resource given by moveTarget. |
moveToId | Moves this resource to the resource corresponding to "id". |
resetInput | No description. |
resetTriggersReplace | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
addMoveTarget
public void addMoveTarget(java.lang.String moveTarget)
Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.
moveTarget
Required
- Type: java.lang.String
The string move target that will correspond to this resource.
getAnyMapAttribute
public java.util.Map< java.lang.String, java.lang.Object > getAnyMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
hasResourceMove
public TerraformResourceMoveByTarget OR TerraformResourceMoveById hasResourceMove()
importFrom
public void importFrom(java.lang.String id)
public void importFrom(java.lang.String id, TerraformProvider provider)
id
Required
- Type: java.lang.String
provider
Optional
- Type: TerraformProvider
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
moveFromId
public void moveFromId(java.lang.String id)
Move the resource corresponding to "id" to this resource.
Note that the resource being moved from must be marked as moved using it's instance function.
id
Required
- Type: java.lang.String
Full id of resource being moved from, e.g. "aws_s3_bucket.example".
moveTo
public void moveTo(java.lang.String moveTarget)
public void moveTo(java.lang.String moveTarget, java.lang.String OR java.lang.Number index)
Moves this resource to the target resource given by moveTarget.
moveTarget
Required
- Type: java.lang.String
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
index
Optional
- Type: java.lang.String OR java.lang.Number
Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.
moveToId
public void moveToId(java.lang.String id)
Moves this resource to the resource corresponding to "id".
id
Required
- Type: java.lang.String
Full id of resource to move to, e.g. "aws_s3_bucket.example".
resetInput
public void resetInput()
resetTriggersReplace
public void resetTriggersReplace()
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isTerraformResource | No description. |
generateConfigForImport | Generates CDKTF code for importing a Data resource upon running "cdktf plan < stack-name >". |
isConstruct
import com.hashicorp.cdktf.DataResource;
DataResource.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataResource;
DataResource.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isTerraformResource
import com.hashicorp.cdktf.DataResource;
DataResource.isTerraformResource(java.lang.Object x)
x
Required
- Type: java.lang.Object
generateConfigForImport
import com.hashicorp.cdktf.DataResource;
DataResource.generateConfigForImport(Construct scope, java.lang.String importToId, java.lang.String importFromId),DataResource.generateConfigForImport(Construct scope, java.lang.String importToId, java.lang.String importFromId, TerraformProvider provider)
Generates CDKTF code for importing a Data resource upon running "cdktf plan < stack-name >".
scope
Required
- Type: software.constructs.Construct
The scope in which to define this construct.
importToId
Required
- Type: java.lang.String
The construct id used in the generated config for the Data to import.
importFromId
Required
- Type: java.lang.String
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 | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
terraformMetaArguments | java.util.Map< java.lang.String, java.lang.Object > | No description. |
terraformResourceType | java.lang.String | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
connection | SSHProvisionerConnection OR WinrmProvisionerConnection | No description. |
count | java.lang.Number OR TerraformCount | No description. |
dependsOn | java.util.List< java.lang.String > | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner> | No description. |
id | java.lang.String | No description. |
output | AnyMap | No description. |
inputInput | java.util.Map< java.lang.String, java.lang.Object > | No description. |
triggersReplaceInput | java.util.Map< java.lang.String, java.lang.Object > | No description. |
input | java.util.Map< java.lang.String, java.lang.Object > | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
triggersReplace | java.util.Map< java.lang.String, java.lang.Object > | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
terraformMetaArguments
Required
public java.util.Map< java.lang.String, java.lang.Object > getTerraformMetaArguments();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceType
Required
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadata
Optional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
connection
Optional
public java.lang.Object getConnection();
count
Optional
public java.lang.Object getCount();
- Type: java.lang.Number OR TerraformCount
dependsOn
Optional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEach
Optional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
lifecycle
Optional
public TerraformResourceLifecycle getLifecycle();
provider
Optional
public TerraformProvider getProvider();
- Type: TerraformProvider
provisioners
Optional
public java.lang.Object getProvisioners();
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
id
Required
public java.lang.String getId();
- Type: java.lang.String
output
Required
public AnyMap getOutput();
- Type: AnyMap
inputInput
Optional
public java.util.Map< java.lang.String, java.lang.Object > getInputInput();
- Type: java.util.Map< java.lang.String, java.lang.Object >
triggersReplaceInput
Optional
public java.util.Map< java.lang.String, java.lang.Object > getTriggersReplaceInput();
- Type: java.util.Map< java.lang.String, java.lang.Object >
input
Required
public java.util.Map< java.lang.String, java.lang.Object > getInput();
- Type: java.util.Map< java.lang.String, java.lang.Object >
(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
triggersReplace
Required
public java.util.Map< java.lang.String, java.lang.Object > getTriggersReplace();
- Type: java.util.Map< java.lang.String, java.lang.Object >
(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 | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteState
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteState;
DataTerraformRemoteState.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.organization(java.lang.String)
.workspaces(IRemoteWorkspace)
// .hostname(java.lang.String)
// .token(java.lang.String)
.build();
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteState;
DataTerraformRemoteState.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteState;
DataTerraformRemoteState.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateAzurerm
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateAzurerm;
DataTerraformRemoteStateAzurerm.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.containerName(java.lang.String)
.key(java.lang.String)
.storageAccountName(java.lang.String)
// .accessKey(java.lang.String)
// .clientCertificatePassword(java.lang.String)
// .clientCertificatePath(java.lang.String)
// .clientId(java.lang.String)
// .clientSecret(java.lang.String)
// .endpoint(java.lang.String)
// .environment(java.lang.String)
// .metadataHost(java.lang.String)
// .msiEndpoint(java.lang.String)
// .oidcRequestToken(java.lang.String)
// .oidcRequestUrl(java.lang.String)
// .oidcToken(java.lang.String)
// .oidcTokenFilePath(java.lang.String)
// .resourceGroupName(java.lang.String)
// .sasToken(java.lang.String)
// .snapshot(java.lang.Boolean)
// .subscriptionId(java.lang.String)
// .tenantId(java.lang.String)
// .useAzureadAuth(java.lang.Boolean)
// .useMicrosoftGraph(java.lang.Boolean)
// .useMsi(java.lang.Boolean)
// .useOidc(java.lang.Boolean)
.build();
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. |
metadataHost | java.lang.String | (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.). |
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. |
oidcToken | java.lang.String | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
oidcTokenFilePath | java.lang.String | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
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.
metadataHost
Optional
- Type: java.lang.String
(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.).
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.
oidcToken
Optional
- Type: java.lang.String
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
oidcTokenFilePath
Optional
- Type: java.lang.String
(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.
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateAzurerm;
DataTerraformRemoteStateAzurerm.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateAzurerm;
DataTerraformRemoteStateAzurerm.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateConsul
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateConsul;
DataTerraformRemoteStateConsul.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.accessToken(java.lang.String)
.path(java.lang.String)
// .address(java.lang.String)
// .caFile(java.lang.String)
// .certFile(java.lang.String)
// .datacenter(java.lang.String)
// .gzip(java.lang.Boolean)
// .httpAuth(java.lang.String)
// .keyFile(java.lang.String)
// .lock(java.lang.Boolean)
// .scheme(java.lang.String)
.build();
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. |
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
id
Required
- Type: java.lang.String
defaults
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspace
Optional
- Type: java.lang.String
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateConsul;
DataTerraformRemoteStateConsul.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateConsul;
DataTerraformRemoteStateConsul.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateCos
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateCos;
DataTerraformRemoteStateCos.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.bucket(java.lang.String)
// .accelerate(java.lang.Boolean)
// .acl(java.lang.String)
// .assumeRole(CosBackendAssumeRole)
// .domain(java.lang.String)
// .encrypt(java.lang.Boolean)
// .endpoint(java.lang.String)
// .key(java.lang.String)
// .prefix(java.lang.String)
// .region(java.lang.String)
// .secretId(java.lang.String)
// .secretKey(java.lang.String)
// .securityToken(java.lang.String)
.build();
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. |
bucket | java.lang.String | (Required) The name of the COS bucket. |
accelerate | java.lang.Boolean | (Optional) Whether to enable global Acceleration. |
acl | java.lang.String | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
assumeRole | CosBackendAssumeRole | (Optional) The assume_role block. |
domain | java.lang.String | (Optional) The root domain of the API request. |
encrypt | java.lang.Boolean | (Optional) Whether to enable server side encryption of the state file. |
endpoint | java.lang.String | (Optional) The Custom Endpoint for the COS backend. |
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. |
securityToken | java.lang.String | (Optional) TencentCloud Security Token of temporary access credentials. |
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
bucket
Required
- Type: java.lang.String
(Required) The name of the COS bucket.
You shall manually create it first.
accelerate
Optional
- Type: java.lang.Boolean
(Optional) Whether to enable global Acceleration.
Defaults to false.
acl
Optional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assumeRole
Optional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domain
Optional
- Type: java.lang.String
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
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.
endpoint
Optional
- Type: java.lang.String
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
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.
securityToken
Optional
- Type: java.lang.String
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateCos;
DataTerraformRemoteStateCos.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateCos;
DataTerraformRemoteStateCos.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateGcs
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateGcs;
DataTerraformRemoteStateGcs.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.bucket(java.lang.String)
// .accessToken(java.lang.String)
// .credentials(java.lang.String)
// .encryptionKey(java.lang.String)
// .impersonateServiceAccount(java.lang.String)
// .impersonateServiceAccountDelegates(java.util.List< java.lang.String >)
// .kmsEncryptionKey(java.lang.String)
// .prefix(java.lang.String)
// .storeageCustomEndpoint(java.lang.String)
.build();
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. |
bucket | java.lang.String | (Required) The name of the GCS bucket. |
accessToken | java.lang.String | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
credentials | java.lang.String | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryptionKey | java.lang.String | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonateServiceAccount | java.lang.String | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonateServiceAccountDelegates | java.util.List< java.lang.String > | (Optional) The delegation chain for an impersonating a service account. |
kmsEncryptionKey | java.lang.String | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
prefix | java.lang.String | (Optional) GCS prefix inside the bucket. |
storeageCustomEndpoint | java.lang.String | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
scope
Required
- Type: 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
bucket
Required
- Type: java.lang.String
(Required) The name of the GCS bucket.
This name must be globally unique.
accessToken
Optional
- Type: java.lang.String
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
credentials
Optional
- Type: java.lang.String
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
encryptionKey
Optional
- Type: java.lang.String
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonateServiceAccount
Optional
- Type: java.lang.String
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
impersonateServiceAccountDelegates
Optional
- Type: java.util.List< java.lang.String >
(Optional) The delegation chain for an impersonating a service account.
kmsEncryptionKey
Optional
- Type: java.lang.String
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
prefix
Optional
- Type: java.lang.String
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeageCustomEndpoint
Optional
- Type: java.lang.String
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
Methods
Name | Description |
---|---|
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateGcs;
DataTerraformRemoteStateGcs.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateGcs;
DataTerraformRemoteStateGcs.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateHttp
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateHttp;
DataTerraformRemoteStateHttp.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.address(java.lang.String)
// .clientCaCertificatePem(java.lang.String)
// .clientCertificatePem(java.lang.String)
// .clientPrivateKeyPem(java.lang.String)
// .lockAddress(java.lang.String)
// .lockMethod(java.lang.String)
// .password(java.lang.String)
// .retryMax(java.lang.Number)
// .retryWaitMax(java.lang.Number)
// .retryWaitMin(java.lang.Number)
// .skipCertVerification(java.lang.Boolean)
// .unlockAddress(java.lang.String)
// .unlockMethod(java.lang.String)
// .updateMethod(java.lang.String)
// .username(java.lang.String)
.build();
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. |
address | java.lang.String | (Required) The address of the REST endpoint. |
clientCaCertificatePem | java.lang.String | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
clientCertificatePem | java.lang.String | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
clientPrivateKeyPem | java.lang.String | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
lockAddress | java.lang.String | (Optional) The address of the lock REST endpoint. |
lockMethod | java.lang.String | (Optional) The HTTP method to use when locking. |
password | java.lang.String | (Optional) The password for HTTP basic authentication. |
retryMax | java.lang.Number | (Optional) The number of HTTP request retries. |
retryWaitMax | java.lang.Number | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retryWaitMin | java.lang.Number | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skipCertVerification | java.lang.Boolean | (Optional) Whether to skip TLS verification. |
unlockAddress | java.lang.String | (Optional) The address of the unlock REST endpoint. |
unlockMethod | java.lang.String | (Optional) The HTTP method to use when unlocking. |
updateMethod | java.lang.String | (Optional) HTTP method to use when updating state. |
username | java.lang.String | (Optional) The username for HTTP basic authentication. |
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
address
Required
- Type: java.lang.String
(Required) The address of the REST endpoint.
clientCaCertificatePem
Optional
- Type: java.lang.String
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
clientCertificatePem
Optional
- Type: java.lang.String
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
clientPrivateKeyPem
Optional
- Type: java.lang.String
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lockAddress
Optional
- Type: java.lang.String
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lockMethod
Optional
- Type: java.lang.String
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
- Type: java.lang.String
(Optional) The password for HTTP basic authentication.
retryMax
Optional
- Type: java.lang.Number
(Optional) The number of HTTP request retries.
Defaults to 2.
retryWaitMax
Optional
- Type: java.lang.Number
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retryWaitMin
Optional
- Type: java.lang.Number
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skipCertVerification
Optional
- Type: java.lang.Boolean
(Optional) Whether to skip TLS verification.
Defaults to false.
unlockAddress
Optional
- Type: java.lang.String
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlockMethod
Optional
- Type: java.lang.String
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
updateMethod
Optional
- Type: java.lang.String
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
- Type: java.lang.String
(Optional) The username for HTTP basic authentication.
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateHttp;
DataTerraformRemoteStateHttp.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateHttp;
DataTerraformRemoteStateHttp.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateLocal
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateLocal;
DataTerraformRemoteStateLocal.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
// .path(java.lang.String)
// .workspaceDir(java.lang.String)
.build();
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. |
path | java.lang.String | Path where the state file is stored. |
workspaceDir | java.lang.String | (Optional) The path to non-default workspaces. |
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
path
Optional
- Type: java.lang.String
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspaceDir
Optional
- Type: java.lang.String
(Optional) The path to non-default workspaces.
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateLocal;
DataTerraformRemoteStateLocal.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateLocal;
DataTerraformRemoteStateLocal.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateOss
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateOss;
DataTerraformRemoteStateOss.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.bucket(java.lang.String)
// .accessKey(java.lang.String)
// .acl(java.lang.String)
// .assumeRole(OssAssumeRole)
// .assumeRolePolicy(java.lang.String)
// .assumeRoleRoleArn(java.lang.String)
// .assumeRoleSessionExpiration(java.lang.Number)
// .assumeRoleSessionName(java.lang.String)
// .ecsRoleName(java.lang.String)
// .encrypt(java.lang.Boolean)
// .endpoint(java.lang.String)
// .key(java.lang.String)
// .prefix(java.lang.String)
// .profile(java.lang.String)
// .region(java.lang.String)
// .secretKey(java.lang.String)
// .securityToken(java.lang.String)
// .sharedCredentialsFile(java.lang.String)
// .stsEndpoint(java.lang.String)
// .tablestoreEndpoint(java.lang.String)
// .tablestoreTable(java.lang.String)
.build();
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. |
bucket | java.lang.String | (Required) The name of the OSS bucket. |
accessKey | java.lang.String | (Optional) Alibaba Cloud access key. |
acl | java.lang.String | (Optional) Object ACL to be applied to the state file. |
assumeRole | OssAssumeRole | No description. |
assumeRolePolicy | java.lang.String | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
assumeRoleRoleArn | java.lang.String | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
assumeRoleSessionExpiration | java.lang.Number | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
assumeRoleSessionName | java.lang.String | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
ecsRoleName | java.lang.String | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
encrypt | java.lang.Boolean | (Optional) Whether to enable server side encryption of the state file. |
endpoint | java.lang.String | (Optional) A custom endpoint for the OSS API. |
key | java.lang.String | (Optional) The name of the state file. |
prefix | java.lang.String | (Optional) The path directory of the state file will be stored. |
profile | java.lang.String | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
region | java.lang.String | (Optional) The region of the OSS bucket. |
secretKey | java.lang.String | (Optional) Alibaba Cloud secret access key. |
securityToken | java.lang.String | (Optional) STS access token. |
sharedCredentialsFile | java.lang.String | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
stsEndpoint | java.lang.String | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
tablestoreEndpoint | java.lang.String | (Optional) A custom endpoint for the TableStore API. |
tablestoreTable | java.lang.String | (Optional) A TableStore table for state locking and consistency. |
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
bucket
Required
- Type: java.lang.String
(Required) The name of the OSS bucket.
accessKey
Optional
- Type: java.lang.String
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file.
assumeRole
Optional
assumeRole
Deprecated: Use flattened assume role options
Type: OssAssumeRole
assumeRolePolicy
Optional
- Type: java.lang.String
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
assumeRoleRoleArn
Optional
- Type: java.lang.String
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
assumeRoleSessionExpiration
Optional
- Type: java.lang.Number
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
assumeRoleSessionName
Optional
- Type: java.lang.String
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
ecsRoleName
Optional
- Type: java.lang.String
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
encrypt
Optional
- Type: java.lang.Boolean
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: java.lang.String
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
- Type: java.lang.String
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
- Type: java.lang.String
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
- Type: java.lang.String
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
region
Optional
- Type: java.lang.String
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secretKey
Optional
- Type: java.lang.String
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
securityToken
Optional
- Type: java.lang.String
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
sharedCredentialsFile
Optional
- Type: java.lang.String
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
stsEndpoint
Optional
- Type: java.lang.String
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
tablestoreEndpoint
Optional
- Type: java.lang.String
(Optional) A custom endpoint for the TableStore API.
tablestoreTable
Optional
- Type: java.lang.String
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type 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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateOss;
DataTerraformRemoteStateOss.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateOss;
DataTerraformRemoteStateOss.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStatePg
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStatePg;
DataTerraformRemoteStatePg.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.connStr(java.lang.String)
// .schemaName(java.lang.String)
// .skipIndexCreation(java.lang.Boolean)
// .skipSchemaCreation(java.lang.Boolean)
// .skipTableCreation(java.lang.Boolean)
.build();
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. |
connStr | java.lang.String | Postgres connection string; |
schemaName | java.lang.String | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
skipIndexCreation | java.lang.Boolean | If set to true, the Postgres index must already exist. |
skipSchemaCreation | java.lang.Boolean | If set to true, the Postgres schema must already exist. |
skipTableCreation | java.lang.Boolean | If set to true, the Postgres table must already exist. |
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
connStr
Required
- Type: java.lang.String
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
schemaName
Optional
- Type: java.lang.String
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
skipIndexCreation
Optional
- Type: java.lang.Boolean
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
skipSchemaCreation
Optional
- Type: java.lang.Boolean
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
skipTableCreation
Optional
- Type: java.lang.Boolean
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
Methods
Name | Description |
---|---|
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStatePg;
DataTerraformRemoteStatePg.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStatePg;
DataTerraformRemoteStatePg.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateS3
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateS3;
DataTerraformRemoteStateS3.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.bucket(java.lang.String)
.key(java.lang.String)
// .accessKey(java.lang.String)
// .acl(java.lang.String)
// .allowedAccountIds(java.util.List< java.lang.String >)
// .assumeRole(S3BackendAssumeRoleConfig)
// .assumeRolePolicy(java.lang.String)
// .assumeRolePolicyArns(java.util.List< java.lang.String >)
// .assumeRoleTags(java.util.Map< java.lang.String, java.lang.String >)
// .assumeRoleTransitiveTagKeys(java.util.List< java.lang.String >)
// .assumeRoleWithWebIdentity(S3BackendAssumeRoleWithWebIdentityConfig)
// .customCaBundle(java.lang.String)
// .dynamodbEndpoint(java.lang.String)
// .dynamodbTable(java.lang.String)
// .ec2MetadataServiceEndpoint(java.lang.String)
// .ec2MetadataServiceEndpointMode(java.lang.String)
// .encrypt(java.lang.Boolean)
// .endpoint(java.lang.String)
// .endpoints(S3BackendEndpointConfig)
// .externalId(java.lang.String)
// .forbiddenAccountIds(java.util.List< java.lang.String >)
// .forcePathStyle(java.lang.Boolean)
// .httpProxy(java.lang.String)
// .httpsProxy(java.lang.String)
// .iamEndpoint(java.lang.String)
// .insecure(java.lang.Boolean)
// .kmsKeyId(java.lang.String)
// .maxRetries(java.lang.Number)
// .noProxy(java.lang.String)
// .profile(java.lang.String)
// .region(java.lang.String)
// .retryMode(java.lang.String)
// .roleArn(java.lang.String)
// .secretKey(java.lang.String)
// .sessionName(java.lang.String)
// .sharedConfigFiles(java.util.List< java.lang.String >)
// .sharedCredentialsFile(java.lang.String)
// .sharedCredentialsFiles(java.util.List< java.lang.String >)
// .skipCredentialsValidation(java.lang.Boolean)
// .skipMetadataApiCheck(java.lang.Boolean)
// .skipRegionValidation(java.lang.Boolean)
// .skipRequestingAccountId(java.lang.Boolean)
// .skipS3Checksum(java.lang.Boolean)
// .sseCustomerKey(java.lang.String)
// .stsEndpoint(java.lang.String)
// .stsRegion(java.lang.String)
// .token(java.lang.String)
// .useLegacyWorkflow(java.lang.Boolean)
// .usePathStyle(java.lang.Boolean)
// .workspaceKeyPrefix(java.lang.String)
.build();
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. |
bucket | java.lang.String | Name of the S3 Bucket. |
key | java.lang.String | Path to the state file inside the S3 Bucket. |
accessKey | java.lang.String | (Optional) AWS access key. |
acl | java.lang.String | (Optional) Canned ACL to be applied to the state file. |
allowedAccountIds | java.util.List< java.lang.String > | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
assumeRole | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
assumeRolePolicy | java.lang.String | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assumeRolePolicyArns | java.util.List< java.lang.String > | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assumeRoleTags | java.util.Map< java.lang.String, java.lang.String > | (Optional) Map of assume role session tags. |
assumeRoleTransitiveTagKeys | java.util.List< java.lang.String > | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
assumeRoleWithWebIdentity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
customCaBundle | java.lang.String | (Optional) File containing custom root and intermediate certificates. |
dynamodbEndpoint | java.lang.String | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodbTable | java.lang.String | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
ec2MetadataServiceEndpoint | java.lang.String | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
ec2MetadataServiceEndpointMode | java.lang.String | (Optional) Mode to use in communicating with the metadata service. |
encrypt | java.lang.Boolean | (Optional) Enable server side encryption of the state file. |
endpoint | java.lang.String | (Optional) Custom endpoint for the AWS S3 API. |
endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
externalId | java.lang.String | (Optional) External identifier to use when assuming the role. |
forbiddenAccountIds | java.util.List< java.lang.String > | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
forcePathStyle | java.lang.Boolean | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
httpProxy | java.lang.String | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
httpsProxy | java.lang.String | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
iamEndpoint | java.lang.String | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
insecure | java.lang.Boolean | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
kmsKeyId | java.lang.String | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
maxRetries | java.lang.Number | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
noProxy | java.lang.String | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
profile | java.lang.String | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | java.lang.String | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
retryMode | java.lang.String | (Optional) Specifies how retries are attempted. |
roleArn | java.lang.String | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secretKey | java.lang.String | (Optional) AWS secret access key. |
sessionName | java.lang.String | (Optional) Session name to use when assuming the role. |
sharedConfigFiles | java.util.List< java.lang.String > | (Optional) List of paths to AWS shared configuration files. |
sharedCredentialsFile | java.lang.String | (Optional) Path to the AWS shared credentials file. |
sharedCredentialsFiles | java.util.List< java.lang.String > | (Optional) List of paths to AWS shared credentials files. |
skipCredentialsValidation | java.lang.Boolean | (Optional) Skip credentials validation via the STS API. |
skipMetadataApiCheck | java.lang.Boolean | (Optional) Skip usage of EC2 Metadata API. |
skipRegionValidation | java.lang.Boolean | (Optional) Skip validation of provided region name. |
skipRequestingAccountId | java.lang.Boolean | (Optional) Whether to skip requesting the account ID. |
skipS3Checksum | java.lang.Boolean | (Optional) Do not include checksum when uploading S3 Objects. |
sseCustomerKey | java.lang.String | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
stsEndpoint | java.lang.String | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
stsRegion | java.lang.String | (Optional) AWS region for STS. |
token | java.lang.String | (Optional) Multi-Factor Authentication (MFA) token. |
useLegacyWorkflow | java.lang.Boolean | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
usePathStyle | java.lang.Boolean | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
workspaceKeyPrefix | java.lang.String | (Optional) Prefix applied to the state path inside the bucket. |
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
bucket
Required
- Type: java.lang.String
Name of the S3 Bucket.
key
Required
- Type: java.lang.String
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
accessKey
Optional
- Type: java.lang.String
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
acl
Optional
- Type: java.lang.String
(Optional) Canned ACL to be applied to the state file.
allowedAccountIds
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
assumeRole
Optional
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
assumeRolePolicy
Optional
assumeRolePolicy
Deprecated: Use assumeRole.policy instead.
Type: java.lang.String
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assumeRolePolicyArns
Optional
assumeRolePolicyArns
Deprecated: Use assumeRole.policyArns instead.
Type: java.util.List< java.lang.String >
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assumeRoleTags
Optional
assumeRoleTags
Deprecated: Use assumeRole.tags instead.
Type: java.util.Map< java.lang.String, java.lang.String >
(Optional) Map of assume role session tags.
assumeRoleTransitiveTagKeys
Optional
assumeRoleTransitiveTagKeys
Deprecated: Use assumeRole.transitiveTagKeys instead.
Type: java.util.List< java.lang.String >
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
assumeRoleWithWebIdentity
Optional
Assume Role With Web Identity Configuration.
customCaBundle
Optional
- Type: java.lang.String
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
dynamodbEndpoint
Optional
dynamodbEndpoint
Deprecated: Use endpoints.dynamodb instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodbTable
Optional
- Type: java.lang.String
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
ec2MetadataServiceEndpoint
Optional
- Type: java.lang.String
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
ec2MetadataServiceEndpointMode
Optional
- Type: java.lang.String
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
encrypt
Optional
- Type: java.lang.Boolean
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
Deprecated: Use endpoints.s3 instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
externalId
Optional
externalId
Deprecated: Use assume_role.external_id instead.
Type: java.lang.String
(Optional) External identifier to use when assuming the role.
forbiddenAccountIds
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
forcePathStyle
Optional
forcePathStyle
Deprecated: Use usePathStyle instead
Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
httpProxy
Optional
- Type: java.lang.String
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
httpsProxy
Optional
- Type: java.lang.String
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
iamEndpoint
Optional
iamEndpoint
Deprecated: Use endpoints.iam instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
insecure
Optional
- Type: java.lang.Boolean
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kmsKeyId
Optional
- Type: java.lang.String
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
maxRetries
Optional
- Type: java.lang.Number
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
noProxy
Optional
- Type: java.lang.String
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
profile
Optional
- Type: java.lang.String
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
region
Optional
- Type: java.lang.String
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
retryMode
Optional
- Type: java.lang.String
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
roleArn
Optional
roleArn
Deprecated: Use assumeRole.roleArn instead.
Type: java.lang.String
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secretKey
Optional
- Type: java.lang.String
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
sessionName
Optional
sessionName
Deprecated: Use assumeRole.sessionName instead.
Type: java.lang.String
(Optional) Session name to use when assuming the role.
sharedConfigFiles
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
sharedCredentialsFile
Optional
- Type: java.lang.String
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
sharedCredentialsFiles
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skipCredentialsValidation
Optional
- Type: java.lang.Boolean
(Optional) Skip credentials validation via the STS API.
skipMetadataApiCheck
Optional
- Type: java.lang.Boolean
(Optional) Skip usage of EC2 Metadata API.
skipRegionValidation
Optional
- Type: java.lang.Boolean
(Optional) Skip validation of provided region name.
skipRequestingAccountId
Optional
- Type: java.lang.Boolean
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
skipS3Checksum
Optional
- Type: java.lang.Boolean
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sseCustomerKey
Optional
- Type: java.lang.String
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
stsEndpoint
Optional
stsEndpoint
Deprecated: Use endpoints.sts instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
stsRegion
Optional
- Type: java.lang.String
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
- Type: java.lang.String
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
useLegacyWorkflow
Optional
- Type: java.lang.Boolean
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
usePathStyle
Optional
- Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspaceKeyPrefix
Optional
- Type: java.lang.String
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
Methods
Name | Description |
---|---|
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateS3;
DataTerraformRemoteStateS3.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateS3;
DataTerraformRemoteStateS3.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
DataTerraformRemoteStateSwift
Initializers
import com.hashicorp.cdktf.DataTerraformRemoteStateSwift;
DataTerraformRemoteStateSwift.Builder.create(Construct scope, java.lang.String id)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.container(java.lang.String)
// .applicationCredentialId(java.lang.String)
// .applicationCredentialName(java.lang.String)
// .applicationCredentialSecret(java.lang.String)
// .archiveContainer(java.lang.String)
// .authUrl(java.lang.String)
// .cacertFile(java.lang.String)
// .cert(java.lang.String)
// .cloud(java.lang.String)
// .defaultDomain(java.lang.String)
// .domainId(java.lang.String)
// .domainName(java.lang.String)
// .expireAfter(java.lang.String)
// .insecure(java.lang.Boolean)
// .key(java.lang.String)
// .password(java.lang.String)
// .projectDomainId(java.lang.String)
// .projectDomainName(java.lang.String)
// .regionName(java.lang.String)
// .stateName(java.lang.String)
// .tenantId(java.lang.String)
// .tenantName(java.lang.String)
// .token(java.lang.String)
// .userDomainId(java.lang.String)
// .userDomainName(java.lang.String)
// .userId(java.lang.String)
// .userName(java.lang.String)
.build();
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. |
container | java.lang.String | No description. |
applicationCredentialId | java.lang.String | No description. |
applicationCredentialName | java.lang.String | No description. |
applicationCredentialSecret | java.lang.String | No description. |
archiveContainer | java.lang.String | No description. |
authUrl | java.lang.String | No description. |
cacertFile | java.lang.String | No description. |
cert | java.lang.String | No description. |
cloud | java.lang.String | No description. |
defaultDomain | java.lang.String | No description. |
domainId | java.lang.String | No description. |
domainName | java.lang.String | No description. |
expireAfter | java.lang.String | No description. |
insecure | java.lang.Boolean | No description. |
key | java.lang.String | No description. |
password | java.lang.String | No description. |
projectDomainId | java.lang.String | No description. |
projectDomainName | java.lang.String | No description. |
regionName | java.lang.String | No description. |
stateName | java.lang.String | No description. |
tenantId | java.lang.String | No description. |
tenantName | java.lang.String | No description. |
token | java.lang.String | No description. |
userDomainId | java.lang.String | No description. |
userDomainName | java.lang.String | No description. |
userId | java.lang.String | No description. |
userName | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
defaults
Optional
defaults
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.util.Map< java.lang.String, java.lang.Object >
workspace
Optional
workspace
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
container
Required
container
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
applicationCredentialId
Optional
applicationCredentialId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
applicationCredentialName
Optional
applicationCredentialName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
applicationCredentialSecret
Optional
applicationCredentialSecret
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
archiveContainer
Optional
archiveContainer
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
authUrl
Optional
authUrl
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
cacertFile
Optional
cacertFile
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
cert
Optional
cert
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
cloud
Optional
cloud
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
defaultDomain
Optional
defaultDomain
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
domainId
Optional
domainId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
domainName
Optional
domainName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
expireAfter
Optional
expireAfter
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
insecure
Optional
insecure
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.Boolean
key
Optional
key
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
password
Optional
password
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
projectDomainId
Optional
projectDomainId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
projectDomainName
Optional
projectDomainName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
regionName
Optional
regionName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
stateName
Optional
stateName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
tenantId
Optional
tenantId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
tenantName
Optional
tenantName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
token
Optional
token
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userDomainId
Optional
userDomainId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userDomainName
Optional
userDomainName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userId
Optional
userId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userName
Optional
userName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
toMetadata
public java.lang.Object toMetadata()
toTerraform
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
isConstruct
import com.hashicorp.cdktf.DataTerraformRemoteStateSwift;
DataTerraformRemoteStateSwift.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.DataTerraformRemoteStateSwift;
DataTerraformRemoteStateSwift.isTerraformElement(java.lang.Object x)
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 swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
cdktfStack
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
fqn
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
friendlyUniqueId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public java.lang.String getFriendlyUniqueId();
- 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 swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public java.lang.String getTfResourceType();
- Type: java.lang.String
GcsBackend
Initializers
import com.hashicorp.cdktf.GcsBackend;
GcsBackend.Builder.create(Construct scope)
.bucket(java.lang.String)
// .accessToken(java.lang.String)
// .credentials(java.lang.String)
// .encryptionKey(java.lang.String)
// .impersonateServiceAccount(java.lang.String)
// .impersonateServiceAccountDelegates(java.util.List< java.lang.String >)
// .kmsEncryptionKey(java.lang.String)
// .prefix(java.lang.String)
// .storeageCustomEndpoint(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
bucket | java.lang.String | (Required) The name of the GCS bucket. |
accessToken | java.lang.String | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
credentials | java.lang.String | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryptionKey | java.lang.String | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonateServiceAccount | java.lang.String | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonateServiceAccountDelegates | java.util.List< java.lang.String > | (Optional) The delegation chain for an impersonating a service account. |
kmsEncryptionKey | java.lang.String | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
prefix | java.lang.String | (Optional) GCS prefix inside the bucket. |
storeageCustomEndpoint | java.lang.String | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
scope
Required
- Type: software.constructs.Construct
bucket
Required
- Type: java.lang.String
(Required) The name of the GCS bucket.
This name must be globally unique.
accessToken
Optional
- Type: java.lang.String
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
credentials
Optional
- Type: java.lang.String
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
encryptionKey
Optional
- Type: java.lang.String
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonateServiceAccount
Optional
- Type: java.lang.String
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
impersonateServiceAccountDelegates
Optional
- Type: java.util.List< java.lang.String >
(Optional) The delegation chain for an impersonating a service account.
kmsEncryptionKey
Optional
- Type: java.lang.String
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
prefix
Optional
- Type: java.lang.String
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeageCustomEndpoint
Optional
- Type: java.lang.String
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
Methods
Name | Description |
---|---|
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.GcsBackend;
GcsBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.GcsBackend;
GcsBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.GcsBackend;
GcsBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
HttpBackend
Initializers
import com.hashicorp.cdktf.HttpBackend;
HttpBackend.Builder.create(Construct scope)
.address(java.lang.String)
// .clientCaCertificatePem(java.lang.String)
// .clientCertificatePem(java.lang.String)
// .clientPrivateKeyPem(java.lang.String)
// .lockAddress(java.lang.String)
// .lockMethod(java.lang.String)
// .password(java.lang.String)
// .retryMax(java.lang.Number)
// .retryWaitMax(java.lang.Number)
// .retryWaitMin(java.lang.Number)
// .skipCertVerification(java.lang.Boolean)
// .unlockAddress(java.lang.String)
// .unlockMethod(java.lang.String)
// .updateMethod(java.lang.String)
// .username(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
address | java.lang.String | (Required) The address of the REST endpoint. |
clientCaCertificatePem | java.lang.String | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
clientCertificatePem | java.lang.String | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
clientPrivateKeyPem | java.lang.String | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
lockAddress | java.lang.String | (Optional) The address of the lock REST endpoint. |
lockMethod | java.lang.String | (Optional) The HTTP method to use when locking. |
password | java.lang.String | (Optional) The password for HTTP basic authentication. |
retryMax | java.lang.Number | (Optional) The number of HTTP request retries. |
retryWaitMax | java.lang.Number | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retryWaitMin | java.lang.Number | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skipCertVerification | java.lang.Boolean | (Optional) Whether to skip TLS verification. |
unlockAddress | java.lang.String | (Optional) The address of the unlock REST endpoint. |
unlockMethod | java.lang.String | (Optional) The HTTP method to use when unlocking. |
updateMethod | java.lang.String | (Optional) HTTP method to use when updating state. |
username | java.lang.String | (Optional) The username for HTTP basic authentication. |
scope
Required
- Type: software.constructs.Construct
address
Required
- Type: java.lang.String
(Required) The address of the REST endpoint.
clientCaCertificatePem
Optional
- Type: java.lang.String
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
clientCertificatePem
Optional
- Type: java.lang.String
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
clientPrivateKeyPem
Optional
- Type: java.lang.String
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lockAddress
Optional
- Type: java.lang.String
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lockMethod
Optional
- Type: java.lang.String
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
password
Optional
- Type: java.lang.String
(Optional) The password for HTTP basic authentication.
retryMax
Optional
- Type: java.lang.Number
(Optional) The number of HTTP request retries.
Defaults to 2.
retryWaitMax
Optional
- Type: java.lang.Number
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retryWaitMin
Optional
- Type: java.lang.Number
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skipCertVerification
Optional
- Type: java.lang.Boolean
(Optional) Whether to skip TLS verification.
Defaults to false.
unlockAddress
Optional
- Type: java.lang.String
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlockMethod
Optional
- Type: java.lang.String
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
updateMethod
Optional
- Type: java.lang.String
(Optional) HTTP method to use when updating state.
Defaults to POST.
username
Optional
- Type: java.lang.String
(Optional) The username for HTTP basic authentication.
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.HttpBackend;
HttpBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.HttpBackend;
HttpBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.HttpBackend;
HttpBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
ImportableResource
Class used to represent an importable resource.
Initializers
import com.hashicorp.cdktf.ImportableResource;
new ImportableResource(Construct scope, java.lang.String name, IImportableConfig config);
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
name | java.lang.String | No description. |
config | IImportableConfig | No description. |
scope
Required
- Type: software.constructs.Construct
name
Required
- Type: java.lang.String
config
Required
- Type: IImportableConfig
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.ImportableResource;
ImportableResource.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.ImportableResource;
ImportableResource.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
LocalBackend
Initializers
import com.hashicorp.cdktf.LocalBackend;
LocalBackend.Builder.create(Construct scope)
// .path(java.lang.String)
// .workspaceDir(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
path | java.lang.String | Path where the state file is stored. |
workspaceDir | java.lang.String | (Optional) The path to non-default workspaces. |
scope
Required
- Type: software.constructs.Construct
path
Optional
- Type: java.lang.String
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspaceDir
Optional
- Type: java.lang.String
(Optional) The path to non-default workspaces.
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String fromStack)
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
import com.hashicorp.cdktf.LocalBackend;
LocalBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.LocalBackend;
LocalBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.LocalBackend;
LocalBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
OssBackend
Initializers
import com.hashicorp.cdktf.OssBackend;
OssBackend.Builder.create(Construct scope)
.bucket(java.lang.String)
// .accessKey(java.lang.String)
// .acl(java.lang.String)
// .assumeRole(OssAssumeRole)
// .assumeRolePolicy(java.lang.String)
// .assumeRoleRoleArn(java.lang.String)
// .assumeRoleSessionExpiration(java.lang.Number)
// .assumeRoleSessionName(java.lang.String)
// .ecsRoleName(java.lang.String)
// .encrypt(java.lang.Boolean)
// .endpoint(java.lang.String)
// .key(java.lang.String)
// .prefix(java.lang.String)
// .profile(java.lang.String)
// .region(java.lang.String)
// .secretKey(java.lang.String)
// .securityToken(java.lang.String)
// .sharedCredentialsFile(java.lang.String)
// .stsEndpoint(java.lang.String)
// .tablestoreEndpoint(java.lang.String)
// .tablestoreTable(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
bucket | java.lang.String | (Required) The name of the OSS bucket. |
accessKey | java.lang.String | (Optional) Alibaba Cloud access key. |
acl | java.lang.String | (Optional) Object ACL to be applied to the state file. |
assumeRole | OssAssumeRole | No description. |
assumeRolePolicy | java.lang.String | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
assumeRoleRoleArn | java.lang.String | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
assumeRoleSessionExpiration | java.lang.Number | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
assumeRoleSessionName | java.lang.String | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
ecsRoleName | java.lang.String | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
encrypt | java.lang.Boolean | (Optional) Whether to enable server side encryption of the state file. |
endpoint | java.lang.String | (Optional) A custom endpoint for the OSS API. |
key | java.lang.String | (Optional) The name of the state file. |
prefix | java.lang.String | (Optional) The path directory of the state file will be stored. |
profile | java.lang.String | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
region | java.lang.String | (Optional) The region of the OSS bucket. |
secretKey | java.lang.String | (Optional) Alibaba Cloud secret access key. |
securityToken | java.lang.String | (Optional) STS access token. |
sharedCredentialsFile | java.lang.String | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
stsEndpoint | java.lang.String | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
tablestoreEndpoint | java.lang.String | (Optional) A custom endpoint for the TableStore API. |
tablestoreTable | java.lang.String | (Optional) A TableStore table for state locking and consistency. |
scope
Required
- Type: software.constructs.Construct
bucket
Required
- Type: java.lang.String
(Required) The name of the OSS bucket.
accessKey
Optional
- Type: java.lang.String
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
acl
Optional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file.
assumeRole
Optional
assumeRole
Deprecated: Use flattened assume role options
Type: OssAssumeRole
assumeRolePolicy
Optional
- Type: java.lang.String
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
assumeRoleRoleArn
Optional
- Type: java.lang.String
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
assumeRoleSessionExpiration
Optional
- Type: java.lang.Number
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
assumeRoleSessionName
Optional
- Type: java.lang.String
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
ecsRoleName
Optional
- Type: java.lang.String
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
encrypt
Optional
- Type: java.lang.Boolean
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
endpoint
Optional
- Type: java.lang.String
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
key
Optional
- Type: java.lang.String
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefix
Optional
- Type: java.lang.String
(Optional) The path directory of the state file will be stored.
Default to "env:".
profile
Optional
- Type: java.lang.String
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
region
Optional
- Type: java.lang.String
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secretKey
Optional
- Type: java.lang.String
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
securityToken
Optional
- Type: java.lang.String
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
sharedCredentialsFile
Optional
- Type: java.lang.String
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
stsEndpoint
Optional
- Type: java.lang.String
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
tablestoreEndpoint
Optional
- Type: java.lang.String
(Optional) A custom endpoint for the TableStore API.
tablestoreTable
Optional
- Type: java.lang.String
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type 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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.OssBackend;
OssBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.OssBackend;
OssBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.OssBackend;
OssBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
PgBackend
Initializers
import com.hashicorp.cdktf.PgBackend;
PgBackend.Builder.create(Construct scope)
.connStr(java.lang.String)
// .schemaName(java.lang.String)
// .skipIndexCreation(java.lang.Boolean)
// .skipSchemaCreation(java.lang.Boolean)
// .skipTableCreation(java.lang.Boolean)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
connStr | java.lang.String | Postgres connection string; |
schemaName | java.lang.String | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
skipIndexCreation | java.lang.Boolean | If set to true, the Postgres index must already exist. |
skipSchemaCreation | java.lang.Boolean | If set to true, the Postgres schema must already exist. |
skipTableCreation | java.lang.Boolean | If set to true, the Postgres table must already exist. |
scope
Required
- Type: software.constructs.Construct
connStr
Required
- Type: java.lang.String
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
schemaName
Optional
- Type: java.lang.String
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
skipIndexCreation
Optional
- Type: java.lang.Boolean
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
skipSchemaCreation
Optional
- Type: java.lang.Boolean
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
skipTableCreation
Optional
- Type: java.lang.Boolean
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
Methods
Name | Description |
---|---|
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.PgBackend;
PgBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.PgBackend;
PgBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.PgBackend;
PgBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
RemoteBackend
Initializers
import com.hashicorp.cdktf.RemoteBackend;
RemoteBackend.Builder.create(Construct scope)
.organization(java.lang.String)
.workspaces(IRemoteWorkspace)
// .hostname(java.lang.String)
// .token(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | 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
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.RemoteBackend;
RemoteBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.RemoteBackend;
RemoteBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.RemoteBackend;
RemoteBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Resource
- Implements: IResource
A construct which represents a resource.
Initializers
import com.hashicorp.cdktf.Resource;
new Resource(Construct scope, java.lang.String id);
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
toString
public java.lang.String toString()
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import com.hashicorp.cdktf.Resource;
Resource.isConstruct(java.lang.Object x)
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.
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
stack | TerraformStack | The stack in which this resource is defined. |
node
Required
node
- Deprecated: - Please use Construct from the constructs package instead.
public Node getNode();
- Type: software.constructs.Node
The tree node.
stack
Required
stack
- Deprecated: - Please use Construct from the constructs package instead.
public TerraformStack getStack();
- Type: TerraformStack
The stack in which this resource is defined.
S3Backend
Initializers
import com.hashicorp.cdktf.S3Backend;
S3Backend.Builder.create(Construct scope)
.bucket(java.lang.String)
.key(java.lang.String)
// .accessKey(java.lang.String)
// .acl(java.lang.String)
// .allowedAccountIds(java.util.List< java.lang.String >)
// .assumeRole(S3BackendAssumeRoleConfig)
// .assumeRolePolicy(java.lang.String)
// .assumeRolePolicyArns(java.util.List< java.lang.String >)
// .assumeRoleTags(java.util.Map< java.lang.String, java.lang.String >)
// .assumeRoleTransitiveTagKeys(java.util.List< java.lang.String >)
// .assumeRoleWithWebIdentity(S3BackendAssumeRoleWithWebIdentityConfig)
// .customCaBundle(java.lang.String)
// .dynamodbEndpoint(java.lang.String)
// .dynamodbTable(java.lang.String)
// .ec2MetadataServiceEndpoint(java.lang.String)
// .ec2MetadataServiceEndpointMode(java.lang.String)
// .encrypt(java.lang.Boolean)
// .endpoint(java.lang.String)
// .endpoints(S3BackendEndpointConfig)
// .externalId(java.lang.String)
// .forbiddenAccountIds(java.util.List< java.lang.String >)
// .forcePathStyle(java.lang.Boolean)
// .httpProxy(java.lang.String)
// .httpsProxy(java.lang.String)
// .iamEndpoint(java.lang.String)
// .insecure(java.lang.Boolean)
// .kmsKeyId(java.lang.String)
// .maxRetries(java.lang.Number)
// .noProxy(java.lang.String)
// .profile(java.lang.String)
// .region(java.lang.String)
// .retryMode(java.lang.String)
// .roleArn(java.lang.String)
// .secretKey(java.lang.String)
// .sessionName(java.lang.String)
// .sharedConfigFiles(java.util.List< java.lang.String >)
// .sharedCredentialsFile(java.lang.String)
// .sharedCredentialsFiles(java.util.List< java.lang.String >)
// .skipCredentialsValidation(java.lang.Boolean)
// .skipMetadataApiCheck(java.lang.Boolean)
// .skipRegionValidation(java.lang.Boolean)
// .skipRequestingAccountId(java.lang.Boolean)
// .skipS3Checksum(java.lang.Boolean)
// .sseCustomerKey(java.lang.String)
// .stsEndpoint(java.lang.String)
// .stsRegion(java.lang.String)
// .token(java.lang.String)
// .useLegacyWorkflow(java.lang.Boolean)
// .usePathStyle(java.lang.Boolean)
// .workspaceKeyPrefix(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
bucket | java.lang.String | Name of the S3 Bucket. |
key | java.lang.String | Path to the state file inside the S3 Bucket. |
accessKey | java.lang.String | (Optional) AWS access key. |
acl | java.lang.String | (Optional) Canned ACL to be applied to the state file. |
allowedAccountIds | java.util.List< java.lang.String > | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
assumeRole | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
assumeRolePolicy | java.lang.String | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assumeRolePolicyArns | java.util.List< java.lang.String > | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assumeRoleTags | java.util.Map< java.lang.String, java.lang.String > | (Optional) Map of assume role session tags. |
assumeRoleTransitiveTagKeys | java.util.List< java.lang.String > | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
assumeRoleWithWebIdentity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
customCaBundle | java.lang.String | (Optional) File containing custom root and intermediate certificates. |
dynamodbEndpoint | java.lang.String | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodbTable | java.lang.String | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
ec2MetadataServiceEndpoint | java.lang.String | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
ec2MetadataServiceEndpointMode | java.lang.String | (Optional) Mode to use in communicating with the metadata service. |
encrypt | java.lang.Boolean | (Optional) Enable server side encryption of the state file. |
endpoint | java.lang.String | (Optional) Custom endpoint for the AWS S3 API. |
endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
externalId | java.lang.String | (Optional) External identifier to use when assuming the role. |
forbiddenAccountIds | java.util.List< java.lang.String > | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
forcePathStyle | java.lang.Boolean | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
httpProxy | java.lang.String | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
httpsProxy | java.lang.String | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
iamEndpoint | java.lang.String | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
insecure | java.lang.Boolean | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
kmsKeyId | java.lang.String | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
maxRetries | java.lang.Number | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
noProxy | java.lang.String | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
profile | java.lang.String | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | java.lang.String | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
retryMode | java.lang.String | (Optional) Specifies how retries are attempted. |
roleArn | java.lang.String | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secretKey | java.lang.String | (Optional) AWS secret access key. |
sessionName | java.lang.String | (Optional) Session name to use when assuming the role. |
sharedConfigFiles | java.util.List< java.lang.String > | (Optional) List of paths to AWS shared configuration files. |
sharedCredentialsFile | java.lang.String | (Optional) Path to the AWS shared credentials file. |
sharedCredentialsFiles | java.util.List< java.lang.String > | (Optional) List of paths to AWS shared credentials files. |
skipCredentialsValidation | java.lang.Boolean | (Optional) Skip credentials validation via the STS API. |
skipMetadataApiCheck | java.lang.Boolean | (Optional) Skip usage of EC2 Metadata API. |
skipRegionValidation | java.lang.Boolean | (Optional) Skip validation of provided region name. |
skipRequestingAccountId | java.lang.Boolean | (Optional) Whether to skip requesting the account ID. |
skipS3Checksum | java.lang.Boolean | (Optional) Do not include checksum when uploading S3 Objects. |
sseCustomerKey | java.lang.String | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
stsEndpoint | java.lang.String | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
stsRegion | java.lang.String | (Optional) AWS region for STS. |
token | java.lang.String | (Optional) Multi-Factor Authentication (MFA) token. |
useLegacyWorkflow | java.lang.Boolean | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
usePathStyle | java.lang.Boolean | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
workspaceKeyPrefix | java.lang.String | (Optional) Prefix applied to the state path inside the bucket. |
scope
Required
- Type: software.constructs.Construct
bucket
Required
- Type: java.lang.String
Name of the S3 Bucket.
key
Required
- Type: java.lang.String
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
accessKey
Optional
- Type: java.lang.String
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
acl
Optional
- Type: java.lang.String
(Optional) Canned ACL to be applied to the state file.
allowedAccountIds
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
assumeRole
Optional
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
assumeRolePolicy
Optional
assumeRolePolicy
Deprecated: Use assumeRole.policy instead.
Type: java.lang.String
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assumeRolePolicyArns
Optional
assumeRolePolicyArns
Deprecated: Use assumeRole.policyArns instead.
Type: java.util.List< java.lang.String >
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assumeRoleTags
Optional
assumeRoleTags
Deprecated: Use assumeRole.tags instead.
Type: java.util.Map< java.lang.String, java.lang.String >
(Optional) Map of assume role session tags.
assumeRoleTransitiveTagKeys
Optional
assumeRoleTransitiveTagKeys
Deprecated: Use assumeRole.transitiveTagKeys instead.
Type: java.util.List< java.lang.String >
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
assumeRoleWithWebIdentity
Optional
Assume Role With Web Identity Configuration.
customCaBundle
Optional
- Type: java.lang.String
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
dynamodbEndpoint
Optional
dynamodbEndpoint
Deprecated: Use endpoints.dynamodb instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodbTable
Optional
- Type: java.lang.String
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
ec2MetadataServiceEndpoint
Optional
- Type: java.lang.String
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
ec2MetadataServiceEndpointMode
Optional
- Type: java.lang.String
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
encrypt
Optional
- Type: java.lang.Boolean
(Optional) Enable server side encryption of the state file.
endpoint
Optional
endpoint
Deprecated: Use endpoints.s3 instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
endpoints
Optional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
externalId
Optional
externalId
Deprecated: Use assume_role.external_id instead.
Type: java.lang.String
(Optional) External identifier to use when assuming the role.
forbiddenAccountIds
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
forcePathStyle
Optional
forcePathStyle
Deprecated: Use usePathStyle instead
Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
httpProxy
Optional
- Type: java.lang.String
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
httpsProxy
Optional
- Type: java.lang.String
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
iamEndpoint
Optional
iamEndpoint
Deprecated: Use endpoints.iam instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
insecure
Optional
- Type: java.lang.Boolean
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kmsKeyId
Optional
- Type: java.lang.String
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
maxRetries
Optional
- Type: java.lang.Number
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
noProxy
Optional
- Type: java.lang.String
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
profile
Optional
- Type: java.lang.String
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
region
Optional
- Type: java.lang.String
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
retryMode
Optional
- Type: java.lang.String
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
roleArn
Optional
roleArn
Deprecated: Use assumeRole.roleArn instead.
Type: java.lang.String
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secretKey
Optional
- Type: java.lang.String
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
sessionName
Optional
sessionName
Deprecated: Use assumeRole.sessionName instead.
Type: java.lang.String
(Optional) Session name to use when assuming the role.
sharedConfigFiles
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
sharedCredentialsFile
Optional
- Type: java.lang.String
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
sharedCredentialsFiles
Optional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skipCredentialsValidation
Optional
- Type: java.lang.Boolean
(Optional) Skip credentials validation via the STS API.
skipMetadataApiCheck
Optional
- Type: java.lang.Boolean
(Optional) Skip usage of EC2 Metadata API.
skipRegionValidation
Optional
- Type: java.lang.Boolean
(Optional) Skip validation of provided region name.
skipRequestingAccountId
Optional
- Type: java.lang.Boolean
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
skipS3Checksum
Optional
- Type: java.lang.Boolean
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sseCustomerKey
Optional
- Type: java.lang.String
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
stsEndpoint
Optional
stsEndpoint
Deprecated: Use endpoints.sts instead
Type: java.lang.String
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
stsRegion
Optional
- Type: java.lang.String
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
token
Optional
- Type: java.lang.String
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
useLegacyWorkflow
Optional
- Type: java.lang.Boolean
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
usePathStyle
Optional
- Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspaceKeyPrefix
Optional
- Type: java.lang.String
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
Methods
Name | Description |
---|---|
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.S3Backend;
S3Backend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.S3Backend;
S3Backend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.S3Backend;
S3Backend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
SwiftBackend
Initializers
import com.hashicorp.cdktf.SwiftBackend;
SwiftBackend.Builder.create(Construct scope)
.container(java.lang.String)
// .applicationCredentialId(java.lang.String)
// .applicationCredentialName(java.lang.String)
// .applicationCredentialSecret(java.lang.String)
// .archiveContainer(java.lang.String)
// .authUrl(java.lang.String)
// .cacertFile(java.lang.String)
// .cert(java.lang.String)
// .cloud(java.lang.String)
// .defaultDomain(java.lang.String)
// .domainId(java.lang.String)
// .domainName(java.lang.String)
// .expireAfter(java.lang.String)
// .insecure(java.lang.Boolean)
// .key(java.lang.String)
// .password(java.lang.String)
// .projectDomainId(java.lang.String)
// .projectDomainName(java.lang.String)
// .regionName(java.lang.String)
// .stateName(java.lang.String)
// .tenantId(java.lang.String)
// .tenantName(java.lang.String)
// .token(java.lang.String)
// .userDomainId(java.lang.String)
// .userDomainName(java.lang.String)
// .userId(java.lang.String)
// .userName(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
container | java.lang.String | No description. |
applicationCredentialId | java.lang.String | No description. |
applicationCredentialName | java.lang.String | No description. |
applicationCredentialSecret | java.lang.String | No description. |
archiveContainer | java.lang.String | No description. |
authUrl | java.lang.String | No description. |
cacertFile | java.lang.String | No description. |
cert | java.lang.String | No description. |
cloud | java.lang.String | No description. |
defaultDomain | java.lang.String | No description. |
domainId | java.lang.String | No description. |
domainName | java.lang.String | No description. |
expireAfter | java.lang.String | No description. |
insecure | java.lang.Boolean | No description. |
key | java.lang.String | No description. |
password | java.lang.String | No description. |
projectDomainId | java.lang.String | No description. |
projectDomainName | java.lang.String | No description. |
regionName | java.lang.String | No description. |
stateName | java.lang.String | No description. |
tenantId | java.lang.String | No description. |
tenantName | java.lang.String | No description. |
token | java.lang.String | No description. |
userDomainId | java.lang.String | No description. |
userDomainName | java.lang.String | No description. |
userId | java.lang.String | No description. |
userName | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
container
Required
container
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
applicationCredentialId
Optional
applicationCredentialId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
applicationCredentialName
Optional
applicationCredentialName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
applicationCredentialSecret
Optional
applicationCredentialSecret
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
archiveContainer
Optional
archiveContainer
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
authUrl
Optional
authUrl
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
cacertFile
Optional
cacertFile
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
cert
Optional
cert
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
cloud
Optional
cloud
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
defaultDomain
Optional
defaultDomain
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
domainId
Optional
domainId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
domainName
Optional
domainName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
expireAfter
Optional
expireAfter
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
insecure
Optional
insecure
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.Boolean
key
Optional
key
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
password
Optional
password
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
projectDomainId
Optional
projectDomainId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
projectDomainName
Optional
projectDomainName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
regionName
Optional
regionName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
stateName
Optional
stateName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
tenantId
Optional
tenantId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
tenantName
Optional
tenantName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
token
Optional
token
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userDomainId
Optional
userDomainId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userDomainName
Optional
userDomainName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userId
Optional
userId
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Type: java.lang.String
userName
Optional
userName
Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
toMetadata
public java.lang.Object toMetadata()
toTerraform
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
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
import com.hashicorp.cdktf.SwiftBackend;
SwiftBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.SwiftBackend;
SwiftBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
isBackend
import com.hashicorp.cdktf.SwiftBackend;
SwiftBackend.isBackend(java.lang.Object x)
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 swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
cdktfStack
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
fqn
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
friendlyUniqueId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
TerraformAsset
Initializers
import com.hashicorp.cdktf.TerraformAsset;
TerraformAsset.Builder.create(Construct scope, java.lang.String id)
.path(java.lang.String)
// .assetHash(java.lang.String)
// .type(AssetType)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
path | java.lang.String | No description. |
assetHash | java.lang.String | No description. |
type | AssetType | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
path
Required
- Type: java.lang.String
assetHash
Optional
- Type: java.lang.String
type
Optional
- Type: AssetType
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import com.hashicorp.cdktf.TerraformAsset;
TerraformAsset.isConstruct(java.lang.Object x)
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.
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
fileName | java.lang.String | Name of the asset. |
path | java.lang.String | The path relative to the root of the terraform directory in posix format Use this property to reference the asset. |
assetHash | java.lang.String | No description. |
type | AssetType | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
fileName
Required
public java.lang.String getFileName();
- Type: java.lang.String
Name of the asset.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
The path relative to the root of the terraform directory in posix format Use this property to reference the asset.
assetHash
Required
public java.lang.String getAssetHash();
- Type: java.lang.String
type
Required
public AssetType getType();
- Type: AssetType
TerraformBackend
Initializers
import com.hashicorp.cdktf.TerraformBackend;
new TerraformBackend(Construct scope, java.lang.String id, java.lang.String name);
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
name | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
name
Required
- 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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String fromStack)
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
import com.hashicorp.cdktf.TerraformBackend;
TerraformBackend.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformBackend;
TerraformBackend.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.TerraformBackend;
TerraformBackend.isBackend(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
TerraformDataSource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
import com.hashicorp.cdktf.TerraformDataSource;
TerraformDataSource.Builder.create(Construct scope, java.lang.String id)
// .connection(SSHProvisionerConnection)
// .connection(WinrmProvisionerConnection)
// .count(java.lang.Number)
// .count(TerraformCount)
// .dependsOn(java.util.List< ITerraformDependable >)
// .forEach(ITerraformIterator)
// .lifecycle(TerraformResourceLifecycle)
// .provider(TerraformProvider)
// .provisioners(java.util.List< FileProvisioner)
// .provisioners(LocalExecProvisioner)
// .provisioners(RemoteExecProvisioner >)
.terraformResourceType(java.lang.String)
// .terraformGeneratorMetadata(TerraformProviderGeneratorMetadata)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
connection | SSHProvisionerConnection OR WinrmProvisionerConnection | No description. |
count | java.lang.Number OR TerraformCount | No description. |
dependsOn | java.util.List< ITerraformDependable> | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner> | No description. |
terraformResourceType | java.lang.String | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
connection
Optional
count
Optional
- Type: java.lang.Number OR TerraformCount
dependsOn
Optional
- Type: java.util.List< ITerraformDependable>
forEach
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
terraformResourceType
Required
- Type: java.lang.String
terraformGeneratorMetadata
Optional
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
interpolationForAttribute | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getAnyMapAttribute
public java.util.Map< java.lang.String, java.lang.Object > getAnyMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isTerraformDataSource | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformDataSource;
TerraformDataSource.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformDataSource;
TerraformDataSource.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isTerraformDataSource
import com.hashicorp.cdktf.TerraformDataSource;
TerraformDataSource.isTerraformDataSource(java.lang.Object x)
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. |
terraformMetaArguments | java.util.Map< java.lang.String, java.lang.Object > | No description. |
terraformResourceType | java.lang.String | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
count | java.lang.Number OR TerraformCount | No description. |
dependsOn | java.util.List< java.lang.String > | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
terraformMetaArguments
Required
public java.util.Map< java.lang.String, java.lang.Object > getTerraformMetaArguments();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceType
Required
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadata
Optional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
count
Optional
public java.lang.Object getCount();
- Type: java.lang.Number OR TerraformCount
dependsOn
Optional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEach
Optional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
lifecycle
Optional
public TerraformResourceLifecycle getLifecycle();
provider
Optional
public TerraformProvider getProvider();
- Type: TerraformProvider
TerraformElement
Initializers
import com.hashicorp.cdktf.TerraformElement;
new TerraformElement(Construct scope, java.lang.String id);,new TerraformElement(Construct scope, java.lang.String id, java.lang.String elementType);
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
elementType | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
elementType
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformElement;
TerraformElement.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformElement;
TerraformElement.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
TerraformHclModule
Initializers
import com.hashicorp.cdktf.TerraformHclModule;
TerraformHclModule.Builder.create(Construct scope, java.lang.String id)
// .dependsOn(java.util.List< ITerraformDependable >)
// .forEach(ITerraformIterator)
// .providers(java.util.List< TerraformProvider)
// .providers(TerraformModuleProvider >)
// .skipAssetCreationFromLocalModules(java.lang.Boolean)
.source(java.lang.String)
// .version(java.lang.String)
// .variables(java.util.Map< java.lang.String, java.lang.Object >)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
dependsOn | java.util.List< ITerraformDependable> | No description. |
forEach | ITerraformIterator | No description. |
providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | No description. |
skipAssetCreationFromLocalModules | java.lang.Boolean | No description. |
source | java.lang.String | No description. |
version | java.lang.String | No description. |
variables | java.util.Map< java.lang.String, java.lang.Object > | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
dependsOn
Optional
- Type: java.util.List< ITerraformDependable>
forEach
Optional
- Type: ITerraformIterator
providers
Optional
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModules
Optional
- Type: java.lang.Boolean
source
Required
- Type: java.lang.String
version
Optional
- Type: java.lang.String
variables
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
addProvider | No description. |
getString | No description. |
interpolationForOutput | No description. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
set | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
addProvider
public void addProvider(TerraformProvider OR TerraformModuleProvider provider)
provider
Required
- Type: TerraformProvider OR TerraformModuleProvider
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
interpolationForOutput
public IResolvable interpolationForOutput(java.lang.String moduleOutput)
moduleOutput
Required
- Type: java.lang.String
get
public java.lang.Object get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
set
public void set(java.lang.String variable, java.lang.Object value)
variable
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformHclModule;
TerraformHclModule.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformHclModule;
TerraformHclModule.isTerraformElement(java.lang.Object x)
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. |
source | java.lang.String | No description. |
providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | No description. |
skipAssetCreationFromLocalModules | java.lang.Boolean | No description. |
version | java.lang.String | No description. |
dependsOn | java.util.List< java.lang.String > | No description. |
forEach | ITerraformIterator | No description. |
variables | java.util.Map< java.lang.String, java.lang.Object > | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
source
Required
public java.lang.String getSource();
- Type: java.lang.String
providers
Optional
public java.lang.Object getProviders();
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModules
Optional
public java.lang.Boolean getSkipAssetCreationFromLocalModules();
- Type: java.lang.Boolean
version
Optional
public java.lang.String getVersion();
- Type: java.lang.String
dependsOn
Optional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEach
Optional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
variables
Optional
public java.util.Map< java.lang.String, java.lang.Object > getVariables();
- Type: java.util.Map< java.lang.String, java.lang.Object >
TerraformLocal
- Implements: ITerraformAddressable
Initializers
import com.hashicorp.cdktf.TerraformLocal;
new TerraformLocal(Construct scope, java.lang.String id, java.lang.Object expression);
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
expression | java.lang.Object | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
expression
Required
- Type: java.lang.Object
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformLocal;
TerraformLocal.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformLocal;
TerraformLocal.isTerraformElement(java.lang.Object x)
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. |
asAnyMap | java.util.Map< java.lang.String, java.lang.Object > | No description. |
asBoolean | IResolvable | No description. |
asBooleanMap | java.util.Map< java.lang.String, java.lang.Boolean > | No description. |
asList | java.util.List< java.lang.String > | No description. |
asNumber | java.lang.Number | No description. |
asNumberMap | java.util.Map< java.lang.String, java.lang.Number > | No description. |
asString | java.lang.String | No description. |
asStringMap | java.util.Map< java.lang.String, java.lang.String > | No description. |
expression | java.lang.Object | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
asAnyMap
Required
public java.util.Map< java.lang.String, java.lang.Object > getAsAnyMap();
- Type: java.util.Map< java.lang.String, java.lang.Object >
asBoolean
Required
public IResolvable getAsBoolean();
- Type: IResolvable
asBooleanMap
Required
public java.util.Map< java.lang.String, java.lang.Boolean > getAsBooleanMap();
- Type: java.util.Map< java.lang.String, java.lang.Boolean >
asList
Required
public java.util.List< java.lang.String > getAsList();
- Type: java.util.List< java.lang.String >
asNumber
Required
public java.lang.Number getAsNumber();
- Type: java.lang.Number
asNumberMap
Required
public java.util.Map< java.lang.String, java.lang.Number > getAsNumberMap();
- Type: java.util.Map< java.lang.String, java.lang.Number >
asString
Required
public java.lang.String getAsString();
- Type: java.lang.String
asStringMap
Required
public java.util.Map< java.lang.String, java.lang.String > getAsStringMap();
- Type: java.util.Map< java.lang.String, java.lang.String >
expression
Required
public java.lang.Object getExpression();
- Type: java.lang.Object
TerraformModule
- Implements: ITerraformDependable
TerraformModule can be used to reference a local terraform module or a module from the Terraform Registry.
It should be used if you can not use generated bindings for the module as you would get by adding the module to your cdktf.json files "terraformModules" array and running cdktf get.
This class is not creating a Terraform module to be used outside of CDKTF. If you want to bundle certain resources together like you would do with a Terraform module, you should use Constructs instead, see http://cdk.tf/constructs for more details.
Initializers
import com.hashicorp.cdktf.TerraformModule;
TerraformModule.Builder.create(Construct scope, java.lang.String id)
// .dependsOn(java.util.List< ITerraformDependable >)
// .forEach(ITerraformIterator)
// .providers(java.util.List< TerraformProvider)
// .providers(TerraformModuleProvider >)
// .skipAssetCreationFromLocalModules(java.lang.Boolean)
.source(java.lang.String)
// .version(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
dependsOn | java.util.List< ITerraformDependable> | No description. |
forEach | ITerraformIterator | No description. |
providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | No description. |
skipAssetCreationFromLocalModules | java.lang.Boolean | No description. |
source | java.lang.String | No description. |
version | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
dependsOn
Optional
- Type: java.util.List< ITerraformDependable>
forEach
Optional
- Type: ITerraformIterator
providers
Optional
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModules
Optional
- Type: java.lang.Boolean
source
Required
- Type: java.lang.String
version
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
addProvider | No description. |
getString | No description. |
interpolationForOutput | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
addProvider
public void addProvider(TerraformProvider OR TerraformModuleProvider provider)
provider
Required
- Type: TerraformProvider OR TerraformModuleProvider
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
interpolationForOutput
public IResolvable interpolationForOutput(java.lang.String moduleOutput)
moduleOutput
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformModule;
TerraformModule.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformModule;
TerraformModule.isTerraformElement(java.lang.Object x)
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. |
source | java.lang.String | No description. |
providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | No description. |
skipAssetCreationFromLocalModules | java.lang.Boolean | No description. |
version | java.lang.String | No description. |
dependsOn | java.util.List< java.lang.String > | No description. |
forEach | ITerraformIterator | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
source
Required
public java.lang.String getSource();
- Type: java.lang.String
providers
Optional
public java.lang.Object getProviders();
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModules
Optional
public java.lang.Boolean getSkipAssetCreationFromLocalModules();
- Type: java.lang.Boolean
version
Optional
public java.lang.String getVersion();
- Type: java.lang.String
dependsOn
Optional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEach
Optional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
TerraformOutput
Initializers
import com.hashicorp.cdktf.TerraformOutput;
TerraformOutput.Builder.create(Construct scope, java.lang.String id)
.value(java.lang.Object)
// .dependsOn(java.util.List< ITerraformDependable >)
// .description(java.lang.String)
// .precondition(Precondition)
// .sensitive(java.lang.Boolean)
// .staticId(java.lang.Boolean)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
value | java.lang.Object | No description. |
dependsOn | java.util.List< ITerraformDependable> | No description. |
description | java.lang.String | No description. |
precondition | Precondition | No description. |
sensitive | java.lang.Boolean | No description. |
staticId | java.lang.Boolean | If set to true the synthesized Terraform Output will be named after the id passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId). |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
dependsOn
Optional
- Type: java.util.List< ITerraformDependable>
description
Optional
- Type: java.lang.String
precondition
Optional
- Type: Precondition
sensitive
Optional
- Type: java.lang.Boolean
staticId
Optional
- Type: java.lang.Boolean
- Default: false
If set to true the synthesized Terraform Output will be named after the id
passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId).
Methods
Name | Description |
---|---|
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isTerraformOutput | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformOutput;
TerraformOutput.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformOutput;
TerraformOutput.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isTerraformOutput
import com.hashicorp.cdktf.TerraformOutput;
TerraformOutput.isTerraformOutput(java.lang.Object x)
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. |
staticId | java.lang.Boolean | No description. |
value | java.lang.Object | No description. |
dependsOn | java.util.List< ITerraformDependable> | No description. |
description | java.lang.String | No description. |
precondition | Precondition | No description. |
sensitive | java.lang.Boolean | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
staticId
Required
public java.lang.Boolean getStaticId();
- Type: java.lang.Boolean
value
Required
public java.lang.Object getValue();
- Type: java.lang.Object
dependsOn
Optional
public java.util.List< ITerraformDependable > getDependsOn();
- Type: java.util.List< ITerraformDependable>
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
precondition
Optional
public Precondition getPrecondition();
- Type: Precondition
sensitive
Optional
public java.lang.Boolean getSensitive();
- Type: java.lang.Boolean
TerraformProvider
Initializers
import com.hashicorp.cdktf.TerraformProvider;
TerraformProvider.Builder.create(Construct scope, java.lang.String id)
.terraformResourceType(java.lang.String)
// .terraformGeneratorMetadata(TerraformProviderGeneratorMetadata)
// .terraformProviderSource(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
terraformResourceType | java.lang.String | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
terraformProviderSource | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
terraformResourceType
Required
- Type: java.lang.String
terraformGeneratorMetadata
Optional
terraformProviderSource
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isTerraformProvider | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformProvider;
TerraformProvider.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformProvider;
TerraformProvider.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isTerraformProvider
import com.hashicorp.cdktf.TerraformProvider;
TerraformProvider.isTerraformProvider(java.lang.Object x)
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. |
metaAttributes | java.util.Map< java.lang.String, java.lang.Object > | No description. |
terraformResourceType | java.lang.String | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
terraformProviderSource | java.lang.String | No description. |
alias | java.lang.String | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
metaAttributes
Required
public java.util.Map< java.lang.String, java.lang.Object > getMetaAttributes();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceType
Required
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadata
Optional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
terraformProviderSource
Optional
public java.lang.String getTerraformProviderSource();
- Type: java.lang.String
alias
Optional
public java.lang.String getAlias();
- Type: java.lang.String
TerraformRemoteState
- Implements: ITerraformAddressable
Initializers
import com.hashicorp.cdktf.TerraformRemoteState;
TerraformRemoteState.Builder.create(Construct scope, java.lang.String id, java.lang.String backend)
// .defaults(java.util.Map< java.lang.String, java.lang.Object >)
// .workspace(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
backend | java.lang.String | No description. |
defaults | java.util.Map< java.lang.String, java.lang.Object > | No description. |
workspace | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
backend
Required
- Type: java.lang.String
defaults
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspace
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
public IResolvable get(java.lang.String output)
output
Required
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
output
Required
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
output
Required
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
output
Required
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
output
Required
- Type: java.lang.String
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformRemoteState;
TerraformRemoteState.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformRemoteState;
TerraformRemoteState.isTerraformElement(java.lang.Object x)
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
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceType
Required
public java.lang.String getTfResourceType();
- Type: java.lang.String
TerraformResource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
import com.hashicorp.cdktf.TerraformResource;
TerraformResource.Builder.create(Construct scope, java.lang.String id)
// .connection(SSHProvisionerConnection)
// .connection(WinrmProvisionerConnection)
// .count(java.lang.Number)
// .count(TerraformCount)
// .dependsOn(java.util.List< ITerraformDependable >)
// .forEach(ITerraformIterator)
// .lifecycle(TerraformResourceLifecycle)
// .provider(TerraformProvider)
// .provisioners(java.util.List< FileProvisioner)
// .provisioners(LocalExecProvisioner)
// .provisioners(RemoteExecProvisioner >)
.terraformResourceType(java.lang.String)
// .terraformGeneratorMetadata(TerraformProviderGeneratorMetadata)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
connection | SSHProvisionerConnection OR WinrmProvisionerConnection | No description. |
count | java.lang.Number OR TerraformCount | No description. |
dependsOn | java.util.List< ITerraformDependable> | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner> | No description. |
terraformResourceType | java.lang.String | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
connection
Optional
count
Optional
- Type: java.lang.Number OR TerraformCount
dependsOn
Optional
- Type: java.util.List< ITerraformDependable>
forEach
Optional
- Type: ITerraformIterator
lifecycle
Optional
provider
Optional
- Type: TerraformProvider
provisioners
Optional
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
terraformResourceType
Required
- Type: java.lang.String
terraformGeneratorMetadata
Optional
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
addMoveTarget | Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
hasResourceMove | No description. |
importFrom | No description. |
interpolationForAttribute | No description. |
moveFromId | Move the resource corresponding to "id" to this resource. |
moveTo | Moves this resource to the target resource given by moveTarget. |
moveToId | Moves this resource to the resource corresponding to "id". |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
addMoveTarget
public void addMoveTarget(java.lang.String moveTarget)
Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.
moveTarget
Required
- Type: java.lang.String
The string move target that will correspond to this resource.
getAnyMapAttribute
public java.util.Map< java.lang.String, java.lang.Object > getAnyMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
hasResourceMove
public TerraformResourceMoveByTarget OR TerraformResourceMoveById hasResourceMove()
importFrom
public void importFrom(java.lang.String id)
public void importFrom(java.lang.String id, TerraformProvider provider)
id
Required
- Type: java.lang.String
provider
Optional
- Type: TerraformProvider
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
moveFromId
public void moveFromId(java.lang.String id)
Move the resource corresponding to "id" to this resource.
Note that the resource being moved from must be marked as moved using it's instance function.
id
Required
- Type: java.lang.String
Full id of resource being moved from, e.g. "aws_s3_bucket.example".
moveTo
public void moveTo(java.lang.String moveTarget)
public void moveTo(java.lang.String moveTarget, java.lang.String OR java.lang.Number index)
Moves this resource to the target resource given by moveTarget.
moveTarget
Required
- Type: java.lang.String
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
index
Optional
- Type: java.lang.String OR java.lang.Number
Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.
moveToId
public void moveToId(java.lang.String id)
Moves this resource to the resource corresponding to "id".
id
Required
- Type: java.lang.String
Full id of resource to move to, e.g. "aws_s3_bucket.example".
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isTerraformResource | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformResource;
TerraformResource.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformResource;
TerraformResource.isTerraformElement(java.lang.Object x)
x
Required
- Type: java.lang.Object
isTerraformResource
import com.hashicorp.cdktf.TerraformResource;
TerraformResource.isTerraformResource(java.lang.Object x)
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. |
terraformMetaArguments | java.util.Map< java.lang.String, java.lang.Object > | No description. |
terraformResourceType | java.lang.String | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
connection | SSHProvisionerConnection OR WinrmProvisionerConnection | No description. |
count | java.lang.Number OR TerraformCount | No description. |
dependsOn | java.util.List< java.lang.String > | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner> | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
terraformMetaArguments
Required
public java.util.Map< java.lang.String, java.lang.Object > getTerraformMetaArguments();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceType
Required
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadata
Optional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
connection
Optional
public java.lang.Object getConnection();
count
Optional
public java.lang.Object getCount();
- Type: java.lang.Number OR TerraformCount
dependsOn
Optional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEach
Optional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
lifecycle
Optional
public TerraformResourceLifecycle getLifecycle();
provider
Optional
public TerraformProvider getProvider();
- Type: TerraformProvider
provisioners
Optional
public java.lang.Object getProvisioners();
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
TerraformStack
Initializers
import com.hashicorp.cdktf.TerraformStack;
new TerraformStack(Construct scope, java.lang.String id);
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
addDependency | No description. |
addOverride | No description. |
allProviders | No description. |
dependsOn | No description. |
ensureBackendExists | No description. |
getLogicalId | No description. |
hasResourceMove | No description. |
prepareStack | No description. |
registerIncomingCrossStackReference | No description. |
registerOutgoingCrossStackReference | No description. |
runAllValidations | Run all validations on the stack. |
toHclTerraform | No description. |
toTerraform | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addDependency
public void addDependency(TerraformStack dependency)
dependency
Required
- Type: TerraformStack
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
allProviders
public java.util.List< TerraformProvider > allProviders()
dependsOn
public java.lang.Boolean dependsOn(TerraformStack stack)
stack
Required
- Type: TerraformStack
ensureBackendExists
public TerraformBackend ensureBackendExists()
getLogicalId
public java.lang.String getLogicalId(Node OR TerraformElement tfElement)
tfElement
Required
- Type: software.constructs.Node OR TerraformElement
hasResourceMove
public java.lang.Boolean hasResourceMove()
prepareStack
public void prepareStack()
registerIncomingCrossStackReference
public TerraformRemoteState registerIncomingCrossStackReference(TerraformStack fromStack)
fromStack
Required
- Type: TerraformStack
registerOutgoingCrossStackReference
public TerraformOutput registerOutgoingCrossStackReference(java.lang.String identifier)
identifier
Required
- Type: java.lang.String
runAllValidations
public void runAllValidations()
Run all validations on the stack.
toHclTerraform
public java.util.Map< java.lang.String, java.lang.Object > toHclTerraform()
toTerraform
public java.lang.Object toTerraform()
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isStack | No description. |
of | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformStack;
TerraformStack.isConstruct(java.lang.Object x)
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.
isStack
import com.hashicorp.cdktf.TerraformStack;
TerraformStack.isStack(java.lang.Object x)
x
Required
- Type: java.lang.Object
of
import com.hashicorp.cdktf.TerraformStack;
TerraformStack.of(IConstruct construct)
construct
Required
- Type: software.constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node | software.constructs.Node | The tree node. |
dependencies | java.util.List< TerraformStack> | No description. |
moveTargets | TerraformResourceTargets | No description. |
synthesizer | IStackSynthesizer | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
dependencies
Required
public java.util.List< TerraformStack > getDependencies();
- Type: java.util.List< TerraformStack>
moveTargets
Required
public TerraformResourceTargets getMoveTargets();
- Type: TerraformResourceTargets
synthesizer
Required
public IStackSynthesizer getSynthesizer();
- Type: IStackSynthesizer
TerraformVariable
- Implements: ITerraformAddressable
Initializers
import com.hashicorp.cdktf.TerraformVariable;
TerraformVariable.Builder.create(Construct scope, java.lang.String id)
// .default(java.lang.Object)
// .description(java.lang.String)
// .nullable(java.lang.Boolean)
// .sensitive(java.lang.Boolean)
// .type(java.lang.String)
// .validation(java.util.List< TerraformVariableValidationConfig >)
.build();
Name | Type | Description |
---|---|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
default | java.lang.Object | No description. |
description | java.lang.String | No description. |
nullable | java.lang.Boolean | No description. |
sensitive | java.lang.Boolean | No description. |
type | java.lang.String | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. |
validation | java.util.List< TerraformVariableValidationConfig> | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
default
Optional
- Type: java.lang.Object
description
Optional
- Type: java.lang.String
nullable
Optional
- Type: java.lang.Boolean
sensitive
Optional
- Type: java.lang.Boolean
type
Optional
- Type: java.lang.String
The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable.
If no type constraint is set then a value of any type is accepted.
While type constraints are optional, we recommend specifying them; they serve as easy reminders for users of the module, and allow Terraform to return a helpful error message if the wrong type is used.
Type constraints are created from a mixture of type keywords and type constructors. The supported type keywords are:
- string
- number
- bool
The type constructors allow you to specify complex types such as collections:
- list(< TYPE >)
- set(< TYPE >)
- map(< TYPE >)
- object({< ATTR NAME > = < TYPE >, ... })
- tuple([< TYPE >, ...])
The keyword any may be used to indicate that any type is acceptable. For more information on the meaning and behavior of these different types, as well as detailed information about automatic conversion of complex types, refer to {@link https://developer.hashicorp.com/terraform/language/expressions/type-constraints Type Constraints}.
If both the type and default arguments are specified, the given default value must be convertible to the specified type.
validation
Optional
- Type: java.util.List< TerraformVariableValidationConfig>
Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
addValidation | No description. |
synthesizeAttributes | No description. |
synthesizeHclAttributes | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
path
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
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
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
public java.lang.Object toHclTerraform()
toMetadata
public java.lang.Object toMetadata()
toTerraform
public java.lang.Object toTerraform()
addValidation
public void addValidation(TerraformVariableValidationConfig validation)
validation
Required
synthesizeAttributes
public java.util.Map< java.lang.String, java.lang.Object > synthesizeAttributes()
synthesizeHclAttributes
public java.util.Map< java.lang.String, java.lang.Object > synthesizeHclAttributes()
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import com.hashicorp.cdktf.TerraformVariable;
TerraformVariable.isConstruct(java.lang.Object x)
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
import com.hashicorp.cdktf.TerraformVariable;
TerraformVariable.isTerraformElement(java.lang.Object x)
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. |
booleanValue | IResolvable | No description. |
listValue | java.util.List< java.lang.String > | No description. |
numberValue | java.lang.Number | No description. |
stringValue | java.lang.String | No description. |
value | java.lang.Object | No description. |
default | java.lang.Object | No description. |
description | java.lang.String | No description. |
nullable | java.lang.Boolean | No description. |
sensitive | java.lang.Boolean | No description. |
type | java.lang.String | No description. |
validation | java.util.List< TerraformVariableValidationConfig> | No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStack
Required
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueId
Required
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
booleanValue
Required
public IResolvable getBooleanValue();
- Type: IResolvable
listValue
Required
public java.util.List< java.lang.String > getListValue();
- Type: java.util.List< java.lang.String >
numberValue
Required
public java.lang.Number getNumberValue();
- Type: java.lang.Number
stringValue
Required
public java.lang.String getStringValue();
- Type: java.lang.String
value
Required
public java.lang.Object getValue();
- Type: java.lang.Object
default
Optional
public java.lang.Object getDefault();
- Type: java.lang.Object
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
nullable
Optional
public java.lang.Boolean getNullable();
- Type: java.lang.Boolean
sensitive
Optional
public java.lang.Boolean getSensitive();
- Type: java.lang.Boolean
type
Optional
public java.lang.String getType();
- Type: java.lang.String
validation
Optional
public java.util.List< TerraformVariableValidationConfig > getValidation();
- Type: java.util.List< TerraformVariableValidationConfig>