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. |
contextOptional
- 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).
hclOutputOptional
- Type: java.lang.Boolean
outdirOptional
- 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/--outputCLI option - The
CDKTF_OUTDIRenvironment variable - The
outdirkey 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).
skipBackendValidationOptional
- Type: java.lang.Boolean
- Default: false
Whether to skip backend validation during synthesis of the app.
skipValidationOptional
- Type: java.lang.Boolean
- Default: false
Whether to skip all validations during synthesis of the app.
stackTracesOptional
- 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.
fromStackRequired
- Type: TerraformStack
toStackRequired
- Type: TerraformStack
identifierRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isApp
import com.hashicorp.cdktf.App;
App.isApp(java.lang.Object x)
xRequired
- Type: java.lang.Object
of
import com.hashicorp.cdktf.App;
App.of(IConstruct construct)
constructRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
hclOutputRequired
public java.lang.Boolean getHclOutput();
- Type: java.lang.Boolean
manifestRequired
public Manifest getManifest();
- Type: Manifest
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
The output directory into which resources will be synthesized.
skipBackendValidationRequired
public java.lang.Boolean getSkipBackendValidation();
- Type: java.lang.Boolean
Whether to skip backend validation during synthesis of the app.
skipValidationRequired
public java.lang.Boolean getSkipValidation();
- Type: java.lang.Boolean
Whether to skip all validations during synthesis of the app.
targetStackIdOptional
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. |
scopeRequired
- Type: software.constructs.Construct
containerNameRequired
- Type: java.lang.String
(Required) The Name of the Storage Container within the Storage Account.
keyRequired
- Type: java.lang.String
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storageAccountNameRequired
- Type: java.lang.String
(Required) The Name of the Storage Account.
accessKeyOptional
- 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.
clientCertificatePasswordOptional
- 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.
clientCertificatePathOptional
- 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.
clientIdOptional
- Type: java.lang.String
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
clientSecretOptional
- Type: java.lang.String
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpointOptional
- 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.
environmentOptional
- 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.
metadataHostOptional
- 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.).
msiEndpointOptional
- 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.
oidcRequestTokenOptional
- 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.
oidcRequestUrlOptional
- 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.
oidcTokenOptional
- 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.
oidcTokenFilePathOptional
- 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.
resourceGroupNameOptional
- Type: java.lang.String
(Required) The Name of the Resource Group in which the Storage Account exists.
sasTokenOptional
- 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.
snapshotOptional
- 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.
subscriptionIdOptional
- 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.
tenantIdOptional
- 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.
useAzureadAuthOptional
- 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.
useMicrosoftGraphOptional
- 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.
useMsiOptional
- Type: java.lang.Boolean
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
useOidcOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.AzurermBackend;
AzurermBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.AzurermBackend;
AzurermBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
organizationRequired
- Type: java.lang.String
The name of the organization containing the workspace(s) the current configuration should use.
workspacesRequired
- 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:
hostnameOptional
- Type: java.lang.String
- Default: app.terraform.io
The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.
tokenOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.CloudBackend;
CloudBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.CloudBackend;
CloudBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
accessTokenRequired
- Type: java.lang.String
(Required) Access token.
pathRequired
- Type: java.lang.String
(Required) Path in the Consul KV store.
addressOptional
- 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.
caFileOptional
- Type: java.lang.String
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
certFileOptional
- Type: java.lang.String
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenterOptional
- Type: java.lang.String
(Optional) The datacenter to use.
Defaults to that of the agent.
gzipOptional
- Type: java.lang.Boolean
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
httpAuthOptional
- 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.
keyFileOptional
- Type: java.lang.String
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lockOptional
- 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.
schemeOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.ConsulBackend;
ConsulBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.ConsulBackend;
ConsulBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
bucketRequired
- Type: java.lang.String
(Required) The name of the COS bucket.
You shall manually create it first.
accelerateOptional
- Type: java.lang.Boolean
(Optional) Whether to enable global Acceleration.
Defaults to false.
aclOptional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assumeRoleOptional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domainOptional
- Type: java.lang.String
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encryptOptional
- 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.
endpointOptional
- Type: java.lang.String
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
keyOptional
- Type: java.lang.String
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefixOptional
- Type: java.lang.String
(Optional) The directory for saving the state file in bucket.
Default to "env:".
regionOptional
- Type: java.lang.String
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secretIdOptional
- Type: java.lang.String
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secretKeyOptional
- Type: java.lang.String
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
securityTokenOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.CosBackend;
CosBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.CosBackend;
CosBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
The scope in which to define this construct.
idRequired
- Type: java.lang.String
The scoped construct ID.
Must be unique amongst siblings in the same scope
connectionOptional
countOptional
- Type: java.lang.Number OR TerraformCount
dependsOnOptional
- Type: java.util.List< ITerraformDependable>
forEachOptional
- Type: ITerraformIterator
lifecycleOptional
providerOptional
- Type: TerraformProvider
provisionersOptional
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
inputOptional
- 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
triggersReplaceOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
moveTargetRequired
- 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)
terraformAttributeRequired
- Type: java.lang.String
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- 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)
idRequired
- Type: java.lang.String
providerOptional
- Type: TerraformProvider
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- 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.
idRequired
- 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.
moveTargetRequired
- Type: java.lang.String
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
indexOptional
- 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".
idRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataResource;
DataResource.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isTerraformResource
import com.hashicorp.cdktf.DataResource;
DataResource.isTerraformResource(java.lang.Object x)
xRequired
- 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 >".
scopeRequired
- Type: software.constructs.Construct
The scope in which to define this construct.
importToIdRequired
- Type: java.lang.String
The construct id used in the generated config for the Data to import.
importFromIdRequired
- 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
providerOptional
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
terraformMetaArgumentsRequired
public java.util.Map< java.lang.String, java.lang.Object > getTerraformMetaArguments();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceTypeRequired
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadataOptional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
connectionOptional
public java.lang.Object getConnection();
countOptional
public java.lang.Object getCount();
- Type: java.lang.Number OR TerraformCount
dependsOnOptional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEachOptional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
lifecycleOptional
public TerraformResourceLifecycle getLifecycle();
providerOptional
public TerraformProvider getProvider();
- Type: TerraformProvider
provisionersOptional
public java.lang.Object getProvisioners();
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
idRequired
public java.lang.String getId();
- Type: java.lang.String
outputRequired
public AnyMap getOutput();
- Type: AnyMap
inputInputOptional
public java.util.Map< java.lang.String, java.lang.Object > getInputInput();
- Type: java.util.Map< java.lang.String, java.lang.Object >
triggersReplaceInputOptional
public java.util.Map< java.lang.String, java.lang.Object > getTriggersReplaceInput();
- Type: java.util.Map< java.lang.String, java.lang.Object >
inputRequired
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
triggersReplaceRequired
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. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
organizationRequired
- Type: java.lang.String
workspacesRequired
- Type: IRemoteWorkspace
hostnameOptional
- Type: java.lang.String
tokenOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteState;
DataTerraformRemoteState.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
containerNameRequired
- Type: java.lang.String
(Required) The Name of the Storage Container within the Storage Account.
keyRequired
- Type: java.lang.String
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storageAccountNameRequired
- Type: java.lang.String
(Required) The Name of the Storage Account.
accessKeyOptional
- 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.
clientCertificatePasswordOptional
- 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.
clientCertificatePathOptional
- 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.
clientIdOptional
- Type: java.lang.String
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
clientSecretOptional
- Type: java.lang.String
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpointOptional
- 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.
environmentOptional
- 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.
metadataHostOptional
- 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.).
msiEndpointOptional
- 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.
oidcRequestTokenOptional
- 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.
oidcRequestUrlOptional
- 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.
oidcTokenOptional
- 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.
oidcTokenFilePathOptional
- 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.
resourceGroupNameOptional
- Type: java.lang.String
(Required) The Name of the Resource Group in which the Storage Account exists.
sasTokenOptional
- 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.
snapshotOptional
- 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.
subscriptionIdOptional
- 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.
tenantIdOptional
- 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.
useAzureadAuthOptional
- 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.
useMicrosoftGraphOptional
- 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.
useMsiOptional
- Type: java.lang.Boolean
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
useOidcOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateAzurerm;
DataTerraformRemoteStateAzurerm.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
accessTokenRequired
- Type: java.lang.String
(Required) Access token.
pathRequired
- Type: java.lang.String
(Required) Path in the Consul KV store.
addressOptional
- 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.
caFileOptional
- Type: java.lang.String
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
certFileOptional
- Type: java.lang.String
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenterOptional
- Type: java.lang.String
(Optional) The datacenter to use.
Defaults to that of the agent.
gzipOptional
- Type: java.lang.Boolean
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
httpAuthOptional
- 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.
keyFileOptional
- Type: java.lang.String
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lockOptional
- 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.
schemeOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateConsul;
DataTerraformRemoteStateConsul.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
bucketRequired
- Type: java.lang.String
(Required) The name of the COS bucket.
You shall manually create it first.
accelerateOptional
- Type: java.lang.Boolean
(Optional) Whether to enable global Acceleration.
Defaults to false.
aclOptional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
assumeRoleOptional
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
domainOptional
- Type: java.lang.String
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
encryptOptional
- 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.
endpointOptional
- Type: java.lang.String
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
keyOptional
- Type: java.lang.String
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefixOptional
- Type: java.lang.String
(Optional) The directory for saving the state file in bucket.
Default to "env:".
regionOptional
- Type: java.lang.String
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secretIdOptional
- Type: java.lang.String
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secretKeyOptional
- Type: java.lang.String
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
securityTokenOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateCos;
DataTerraformRemoteStateCos.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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). |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
bucketRequired
- Type: java.lang.String
(Required) The name of the GCS bucket.
This name must be globally unique.
accessTokenOptional
- 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.
credentialsOptional
- 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.
encryptionKeyOptional
- Type: java.lang.String
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonateServiceAccountOptional
- 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.
impersonateServiceAccountDelegatesOptional
- Type: java.util.List< java.lang.String >
(Optional) The delegation chain for an impersonating a service account.
kmsEncryptionKeyOptional
- 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}.
prefixOptional
- Type: java.lang.String
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeageCustomEndpointOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateGcs;
DataTerraformRemoteStateGcs.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
addressRequired
- Type: java.lang.String
(Required) The address of the REST endpoint.
clientCaCertificatePemOptional
- Type: java.lang.String
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
clientCertificatePemOptional
- Type: java.lang.String
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
clientPrivateKeyPemOptional
- Type: java.lang.String
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lockAddressOptional
- Type: java.lang.String
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lockMethodOptional
- Type: java.lang.String
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
passwordOptional
- Type: java.lang.String
(Optional) The password for HTTP basic authentication.
retryMaxOptional
- Type: java.lang.Number
(Optional) The number of HTTP request retries.
Defaults to 2.
retryWaitMaxOptional
- Type: java.lang.Number
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retryWaitMinOptional
- Type: java.lang.Number
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skipCertVerificationOptional
- Type: java.lang.Boolean
(Optional) Whether to skip TLS verification.
Defaults to false.
unlockAddressOptional
- Type: java.lang.String
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlockMethodOptional
- Type: java.lang.String
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
updateMethodOptional
- Type: java.lang.String
(Optional) HTTP method to use when updating state.
Defaults to POST.
usernameOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateHttp;
DataTerraformRemoteStateHttp.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
pathOptional
- Type: java.lang.String
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspaceDirOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateLocal;
DataTerraformRemoteStateLocal.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
bucketRequired
- Type: java.lang.String
(Required) The name of the OSS bucket.
accessKeyOptional
- Type: java.lang.String
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
aclOptional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file.
assumeRoleOptional
assumeRoleDeprecated: Use flattened assume role options
Type: OssAssumeRole
assumeRolePolicyOptional
- 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.
assumeRoleRoleArnOptional
- 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.
assumeRoleSessionExpirationOptional
- 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.
assumeRoleSessionNameOptional
- 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.
ecsRoleNameOptional
- 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.
encryptOptional
- 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.
endpointOptional
- Type: java.lang.String
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
keyOptional
- Type: java.lang.String
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefixOptional
- Type: java.lang.String
(Optional) The path directory of the state file will be stored.
Default to "env:".
profileOptional
- 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.
regionOptional
- Type: java.lang.String
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secretKeyOptional
- Type: java.lang.String
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
securityTokenOptional
- Type: java.lang.String
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
sharedCredentialsFileOptional
- 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.
stsEndpointOptional
- 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.
tablestoreEndpointOptional
- Type: java.lang.String
(Optional) A custom endpoint for the TableStore API.
tablestoreTableOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateOss;
DataTerraformRemoteStateOss.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
connStrRequired
- 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.
schemaNameOptional
- 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.
skipIndexCreationOptional
- 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.
skipSchemaCreationOptional
- 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.
skipTableCreationOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStatePg;
DataTerraformRemoteStatePg.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- Type: java.lang.String
bucketRequired
- Type: java.lang.String
Name of the S3 Bucket.
keyRequired
- 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
accessKeyOptional
- 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).
aclOptional
- Type: java.lang.String
(Optional) Canned ACL to be applied to the state file.
allowedAccountIdsOptional
- 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.
assumeRoleOptional
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.
assumeRolePolicyOptional
assumeRolePolicyDeprecated: Use assumeRole.policy instead.
Type: java.lang.String
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assumeRolePolicyArnsOptional
assumeRolePolicyArnsDeprecated: 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.
assumeRoleTagsOptional
assumeRoleTagsDeprecated: Use assumeRole.tags instead.
Type: java.util.Map< java.lang.String, java.lang.String >
(Optional) Map of assume role session tags.
assumeRoleTransitiveTagKeysOptional
assumeRoleTransitiveTagKeysDeprecated: 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.
assumeRoleWithWebIdentityOptional
Assume Role With Web Identity Configuration.
customCaBundleOptional
- 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.
dynamodbEndpointOptional
dynamodbEndpointDeprecated: 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.
dynamodbTableOptional
- 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.
ec2MetadataServiceEndpointOptional
- 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.
ec2MetadataServiceEndpointModeOptional
- 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.
encryptOptional
- Type: java.lang.Boolean
(Optional) Enable server side encryption of the state file.
endpointOptional
endpointDeprecated: 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.
endpointsOptional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
externalIdOptional
externalIdDeprecated: Use assume_role.external_id instead.
Type: java.lang.String
(Optional) External identifier to use when assuming the role.
forbiddenAccountIdsOptional
- 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.
forcePathStyleOptional
forcePathStyleDeprecated: Use usePathStyle instead
Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
httpProxyOptional
- 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.
httpsProxyOptional
- 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.
iamEndpointOptional
iamEndpointDeprecated: 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.
insecureOptional
- Type: java.lang.Boolean
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kmsKeyIdOptional
- 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.
maxRetriesOptional
- Type: java.lang.Number
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
noProxyOptional
- 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.
profileOptional
- 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.
regionOptional
- 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.
retryModeOptional
- 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.
roleArnOptional
roleArnDeprecated: Use assumeRole.roleArn instead.
Type: java.lang.String
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secretKeyOptional
- 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)
sessionNameOptional
sessionNameDeprecated: Use assumeRole.sessionName instead.
Type: java.lang.String
(Optional) Session name to use when assuming the role.
sharedConfigFilesOptional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
sharedCredentialsFileOptional
- Type: java.lang.String
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
sharedCredentialsFilesOptional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skipCredentialsValidationOptional
- Type: java.lang.Boolean
(Optional) Skip credentials validation via the STS API.
skipMetadataApiCheckOptional
- Type: java.lang.Boolean
(Optional) Skip usage of EC2 Metadata API.
skipRegionValidationOptional
- Type: java.lang.Boolean
(Optional) Skip validation of provided region name.
skipRequestingAccountIdOptional
- 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.
skipS3ChecksumOptional
- Type: java.lang.Boolean
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sseCustomerKeyOptional
- 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.
stsEndpointOptional
stsEndpointDeprecated: 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.
stsRegionOptional
- Type: java.lang.String
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
tokenOptional
- Type: java.lang.String
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
useLegacyWorkflowOptional
- 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.
usePathStyleOptional
- Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspaceKeyPrefixOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.DataTerraformRemoteStateS3;
DataTerraformRemoteStateS3.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultsOptional
defaultsDeprecated: 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 >
workspaceOptional
workspaceDeprecated: 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
containerRequired
containerDeprecated: 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
applicationCredentialIdOptional
applicationCredentialIdDeprecated: 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
applicationCredentialNameOptional
applicationCredentialNameDeprecated: 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
applicationCredentialSecretOptional
applicationCredentialSecretDeprecated: 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
archiveContainerOptional
archiveContainerDeprecated: 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
authUrlOptional
authUrlDeprecated: 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
cacertFileOptional
cacertFileDeprecated: 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
certOptional
certDeprecated: 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
cloudOptional
cloudDeprecated: 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
defaultDomainOptional
defaultDomainDeprecated: 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
domainIdOptional
domainIdDeprecated: 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
domainNameOptional
domainNameDeprecated: 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
expireAfterOptional
expireAfterDeprecated: 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
insecureOptional
insecureDeprecated: 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
keyOptional
keyDeprecated: 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
passwordOptional
passwordDeprecated: 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
projectDomainIdOptional
projectDomainIdDeprecated: 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
projectDomainNameOptional
projectDomainNameDeprecated: 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
regionNameOptional
regionNameDeprecated: 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
stateNameOptional
stateNameDeprecated: 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
tenantIdOptional
tenantIdDeprecated: 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
tenantNameOptional
tenantNameDeprecated: 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
tokenOptional
tokenDeprecated: 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
userDomainIdOptional
userDomainIdDeprecated: 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
userDomainNameOptional
userDomainNameDeprecated: 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
userIdOptional
userIdDeprecated: 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
userNameOptional
userNameDeprecated: 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
toStringpublic java.lang.String toString()
Returns a string representation of this construct.
addOverride
addOverridepublic void addOverride(java.lang.String path, java.lang.Object value)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
overrideLogicalIdpublic void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
resetOverrideLogicalIdpublic void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
toHclTerraformpublic java.lang.Object toHclTerraform()
Adds this resource to the terraform JSON output.
toMetadata
toMetadatapublic java.lang.Object toMetadata()
toTerraform
toTerraformpublic java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
get
getpublic IResolvable get(java.lang.String output)
outputRequired
- Type: java.lang.String
getBoolean
getBooleanpublic IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
getListpublic java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
getNumberpublic java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
getStringpublic java.lang.String getString(java.lang.String output)
outputRequired
- Type: java.lang.String
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
isConstructimport 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
isTerraformElementimport com.hashicorp.cdktf.DataTerraformRemoteStateSwift;
DataTerraformRemoteStateSwift.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
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.
cdktfStackRequired
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
fqnRequired
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
friendlyUniqueIdRequired
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. |
tfResourceTypeRequired
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). |
scopeRequired
- Type: software.constructs.Construct
bucketRequired
- Type: java.lang.String
(Required) The name of the GCS bucket.
This name must be globally unique.
accessTokenOptional
- 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.
credentialsOptional
- 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.
encryptionKeyOptional
- Type: java.lang.String
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonateServiceAccountOptional
- 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.
impersonateServiceAccountDelegatesOptional
- Type: java.util.List< java.lang.String >
(Optional) The delegation chain for an impersonating a service account.
kmsEncryptionKeyOptional
- 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}.
prefixOptional
- Type: java.lang.String
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
storeageCustomEndpointOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.GcsBackend;
GcsBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.GcsBackend;
GcsBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
addressRequired
- Type: java.lang.String
(Required) The address of the REST endpoint.
clientCaCertificatePemOptional
- Type: java.lang.String
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
clientCertificatePemOptional
- Type: java.lang.String
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
clientPrivateKeyPemOptional
- Type: java.lang.String
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
lockAddressOptional
- Type: java.lang.String
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lockMethodOptional
- Type: java.lang.String
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
passwordOptional
- Type: java.lang.String
(Optional) The password for HTTP basic authentication.
retryMaxOptional
- Type: java.lang.Number
(Optional) The number of HTTP request retries.
Defaults to 2.
retryWaitMaxOptional
- Type: java.lang.Number
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retryWaitMinOptional
- Type: java.lang.Number
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skipCertVerificationOptional
- Type: java.lang.Boolean
(Optional) Whether to skip TLS verification.
Defaults to false.
unlockAddressOptional
- Type: java.lang.String
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlockMethodOptional
- Type: java.lang.String
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
updateMethodOptional
- Type: java.lang.String
(Optional) HTTP method to use when updating state.
Defaults to POST.
usernameOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.HttpBackend;
HttpBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.HttpBackend;
HttpBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
configRequired
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.ImportableResource;
ImportableResource.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
pathOptional
- Type: java.lang.String
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspaceDirOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.LocalBackend;
LocalBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.LocalBackend;
LocalBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
bucketRequired
- Type: java.lang.String
(Required) The name of the OSS bucket.
accessKeyOptional
- Type: java.lang.String
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
aclOptional
- Type: java.lang.String
(Optional) Object ACL to be applied to the state file.
assumeRoleOptional
assumeRoleDeprecated: Use flattened assume role options
Type: OssAssumeRole
assumeRolePolicyOptional
- 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.
assumeRoleRoleArnOptional
- 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.
assumeRoleSessionExpirationOptional
- 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.
assumeRoleSessionNameOptional
- 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.
ecsRoleNameOptional
- 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.
encryptOptional
- 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.
endpointOptional
- Type: java.lang.String
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
keyOptional
- Type: java.lang.String
(Optional) The name of the state file.
Defaults to terraform.tfstate.
prefixOptional
- Type: java.lang.String
(Optional) The path directory of the state file will be stored.
Default to "env:".
profileOptional
- 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.
regionOptional
- Type: java.lang.String
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
secretKeyOptional
- Type: java.lang.String
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
securityTokenOptional
- Type: java.lang.String
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
sharedCredentialsFileOptional
- 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.
stsEndpointOptional
- 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.
tablestoreEndpointOptional
- Type: java.lang.String
(Optional) A custom endpoint for the TableStore API.
tablestoreTableOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.OssBackend;
OssBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.OssBackend;
OssBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
connStrRequired
- 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.
schemaNameOptional
- 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.
skipIndexCreationOptional
- 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.
skipSchemaCreationOptional
- 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.
skipTableCreationOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.PgBackend;
PgBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.PgBackend;
PgBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
organizationRequired
- Type: java.lang.String
workspacesRequired
- Type: IRemoteWorkspace
hostnameOptional
- Type: java.lang.String
tokenOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.RemoteBackend;
RemoteBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.RemoteBackend;
RemoteBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
toString
toStringpublic java.lang.String toString()
Returns a string representation of this construct.
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstructimport 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.
xRequired
- 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. |
nodeRequired
node- Deprecated: - Please use Construct from the constructs package instead.
public Node getNode();
- Type: software.constructs.Node
The tree node.
stackRequired
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. |
scopeRequired
- Type: software.constructs.Construct
bucketRequired
- Type: java.lang.String
Name of the S3 Bucket.
keyRequired
- 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
accessKeyOptional
- 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).
aclOptional
- Type: java.lang.String
(Optional) Canned ACL to be applied to the state file.
allowedAccountIdsOptional
- 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.
assumeRoleOptional
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.
assumeRolePolicyOptional
assumeRolePolicyDeprecated: Use assumeRole.policy instead.
Type: java.lang.String
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assumeRolePolicyArnsOptional
assumeRolePolicyArnsDeprecated: 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.
assumeRoleTagsOptional
assumeRoleTagsDeprecated: Use assumeRole.tags instead.
Type: java.util.Map< java.lang.String, java.lang.String >
(Optional) Map of assume role session tags.
assumeRoleTransitiveTagKeysOptional
assumeRoleTransitiveTagKeysDeprecated: 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.
assumeRoleWithWebIdentityOptional
Assume Role With Web Identity Configuration.
customCaBundleOptional
- 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.
dynamodbEndpointOptional
dynamodbEndpointDeprecated: 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.
dynamodbTableOptional
- 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.
ec2MetadataServiceEndpointOptional
- 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.
ec2MetadataServiceEndpointModeOptional
- 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.
encryptOptional
- Type: java.lang.Boolean
(Optional) Enable server side encryption of the state file.
endpointOptional
endpointDeprecated: 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.
endpointsOptional
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
externalIdOptional
externalIdDeprecated: Use assume_role.external_id instead.
Type: java.lang.String
(Optional) External identifier to use when assuming the role.
forbiddenAccountIdsOptional
- 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.
forcePathStyleOptional
forcePathStyleDeprecated: Use usePathStyle instead
Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
httpProxyOptional
- 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.
httpsProxyOptional
- 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.
iamEndpointOptional
iamEndpointDeprecated: 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.
insecureOptional
- Type: java.lang.Boolean
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
kmsKeyIdOptional
- 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.
maxRetriesOptional
- Type: java.lang.Number
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
noProxyOptional
- 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.
profileOptional
- 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.
regionOptional
- 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.
retryModeOptional
- 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.
roleArnOptional
roleArnDeprecated: Use assumeRole.roleArn instead.
Type: java.lang.String
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secretKeyOptional
- 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)
sessionNameOptional
sessionNameDeprecated: Use assumeRole.sessionName instead.
Type: java.lang.String
(Optional) Session name to use when assuming the role.
sharedConfigFilesOptional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
sharedCredentialsFileOptional
- Type: java.lang.String
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
sharedCredentialsFilesOptional
- Type: java.util.List< java.lang.String >
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
skipCredentialsValidationOptional
- Type: java.lang.Boolean
(Optional) Skip credentials validation via the STS API.
skipMetadataApiCheckOptional
- Type: java.lang.Boolean
(Optional) Skip usage of EC2 Metadata API.
skipRegionValidationOptional
- Type: java.lang.Boolean
(Optional) Skip validation of provided region name.
skipRequestingAccountIdOptional
- 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.
skipS3ChecksumOptional
- Type: java.lang.Boolean
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
sseCustomerKeyOptional
- 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.
stsEndpointOptional
stsEndpointDeprecated: 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.
stsRegionOptional
- Type: java.lang.String
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
tokenOptional
- Type: java.lang.String
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
useLegacyWorkflowOptional
- 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.
usePathStyleOptional
- Type: java.lang.Boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspaceKeyPrefixOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.S3Backend;
S3Backend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.S3Backend;
S3Backend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
containerRequired
containerDeprecated: 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
applicationCredentialIdOptional
applicationCredentialIdDeprecated: 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
applicationCredentialNameOptional
applicationCredentialNameDeprecated: 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
applicationCredentialSecretOptional
applicationCredentialSecretDeprecated: 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
archiveContainerOptional
archiveContainerDeprecated: 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
authUrlOptional
authUrlDeprecated: 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
cacertFileOptional
cacertFileDeprecated: 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
certOptional
certDeprecated: 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
cloudOptional
cloudDeprecated: 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
defaultDomainOptional
defaultDomainDeprecated: 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
domainIdOptional
domainIdDeprecated: 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
domainNameOptional
domainNameDeprecated: 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
expireAfterOptional
expireAfterDeprecated: 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
insecureOptional
insecureDeprecated: 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
keyOptional
keyDeprecated: 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
passwordOptional
passwordDeprecated: 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
projectDomainIdOptional
projectDomainIdDeprecated: 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
projectDomainNameOptional
projectDomainNameDeprecated: 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
regionNameOptional
regionNameDeprecated: 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
stateNameOptional
stateNameDeprecated: 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
tenantIdOptional
tenantIdDeprecated: 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
tenantNameOptional
tenantNameDeprecated: 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
tokenOptional
tokenDeprecated: 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
userDomainIdOptional
userDomainIdDeprecated: 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
userDomainNameOptional
userDomainNameDeprecated: 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
userIdOptional
userIdDeprecated: 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
userNameOptional
userNameDeprecated: 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
toStringpublic java.lang.String toString()
Returns a string representation of this construct.
addOverride
addOverridepublic void addOverride(java.lang.String path, java.lang.Object value)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
overrideLogicalIdpublic void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: java.lang.String
The new logical ID to use for this stack element.
resetOverrideLogicalId
resetOverrideLogicalIdpublic void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform
toHclTerraformpublic java.lang.Object toHclTerraform()
toMetadata
toMetadatapublic java.lang.Object toMetadata()
toTerraform
toTerraformpublic java.lang.Object toTerraform()
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
getRemoteStateDataSourcepublic TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String _fromStack)
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
_fromStackRequired
- Type: java.lang.String
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isBackend | No description. |
isConstruct
isConstructimport 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
isTerraformElementimport com.hashicorp.cdktf.SwiftBackend;
SwiftBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
isBackendimport com.hashicorp.cdktf.SwiftBackend;
SwiftBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
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.
cdktfStackRequired
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
fqnRequired
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
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
pathRequired
- Type: java.lang.String
assetHashOptional
- Type: java.lang.String
typeOptional
- 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.
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
fileNameRequired
public java.lang.String getFileName();
- Type: java.lang.String
Name of the asset.
pathRequired
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.
assetHashRequired
public java.lang.String getAssetHash();
- Type: java.lang.String
typeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
nameRequired
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
scopeRequired
- Type: software.constructs.Construct
nameRequired
- Type: java.lang.String
fromStackRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformBackend;
TerraformBackend.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isBackend
import com.hashicorp.cdktf.TerraformBackend;
TerraformBackend.isBackend(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
connectionOptional
countOptional
- Type: java.lang.Number OR TerraformCount
dependsOnOptional
- Type: java.util.List< ITerraformDependable>
forEachOptional
- Type: ITerraformIterator
lifecycleOptional
providerOptional
- Type: TerraformProvider
provisionersOptional
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
terraformResourceTypeRequired
- Type: java.lang.String
terraformGeneratorMetadataOptional
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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
terraformAttributeRequired
- Type: java.lang.String
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformDataSource;
TerraformDataSource.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isTerraformDataSource
import com.hashicorp.cdktf.TerraformDataSource;
TerraformDataSource.isTerraformDataSource(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
terraformMetaArgumentsRequired
public java.util.Map< java.lang.String, java.lang.Object > getTerraformMetaArguments();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceTypeRequired
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadataOptional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
countOptional
public java.lang.Object getCount();
- Type: java.lang.Number OR TerraformCount
dependsOnOptional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEachOptional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
lifecycleOptional
public TerraformResourceLifecycle getLifecycle();
providerOptional
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
elementTypeOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformElement;
TerraformElement.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
dependsOnOptional
- Type: java.util.List< ITerraformDependable>
forEachOptional
- Type: ITerraformIterator
providersOptional
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModulesOptional
- Type: java.lang.Boolean
sourceRequired
- Type: java.lang.String
versionOptional
- Type: java.lang.String
variablesOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
providerRequired
- Type: TerraformProvider OR TerraformModuleProvider
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- Type: java.lang.String
interpolationForOutput
public IResolvable interpolationForOutput(java.lang.String moduleOutput)
moduleOutputRequired
- Type: java.lang.String
get
public java.lang.Object get(java.lang.String output)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
set
public void set(java.lang.String variable, java.lang.Object value)
variableRequired
- Type: java.lang.String
valueRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformHclModule;
TerraformHclModule.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
sourceRequired
public java.lang.String getSource();
- Type: java.lang.String
providersOptional
public java.lang.Object getProviders();
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModulesOptional
public java.lang.Boolean getSkipAssetCreationFromLocalModules();
- Type: java.lang.Boolean
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
dependsOnOptional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEachOptional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
variablesOptional
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
expressionRequired
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformLocal;
TerraformLocal.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
asAnyMapRequired
public java.util.Map< java.lang.String, java.lang.Object > getAsAnyMap();
- Type: java.util.Map< java.lang.String, java.lang.Object >
asBooleanRequired
public IResolvable getAsBoolean();
- Type: IResolvable
asBooleanMapRequired
public java.util.Map< java.lang.String, java.lang.Boolean > getAsBooleanMap();
- Type: java.util.Map< java.lang.String, java.lang.Boolean >
asListRequired
public java.util.List< java.lang.String > getAsList();
- Type: java.util.List< java.lang.String >
asNumberRequired
public java.lang.Number getAsNumber();
- Type: java.lang.Number
asNumberMapRequired
public java.util.Map< java.lang.String, java.lang.Number > getAsNumberMap();
- Type: java.util.Map< java.lang.String, java.lang.Number >
asStringRequired
public java.lang.String getAsString();
- Type: java.lang.String
asStringMapRequired
public java.util.Map< java.lang.String, java.lang.String > getAsStringMap();
- Type: java.util.Map< java.lang.String, java.lang.String >
expressionRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
dependsOnOptional
- Type: java.util.List< ITerraformDependable>
forEachOptional
- Type: ITerraformIterator
providersOptional
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModulesOptional
- Type: java.lang.Boolean
sourceRequired
- Type: java.lang.String
versionOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
providerRequired
- Type: TerraformProvider OR TerraformModuleProvider
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- Type: java.lang.String
interpolationForOutput
public IResolvable interpolationForOutput(java.lang.String moduleOutput)
moduleOutputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformModule;
TerraformModule.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
sourceRequired
public java.lang.String getSource();
- Type: java.lang.String
providersOptional
public java.lang.Object getProviders();
- Type: java.util.List< TerraformProvider OR TerraformModuleProvider>
skipAssetCreationFromLocalModulesOptional
public java.lang.Boolean getSkipAssetCreationFromLocalModules();
- Type: java.lang.Boolean
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
dependsOnOptional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEachOptional
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). |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
dependsOnOptional
- Type: java.util.List< ITerraformDependable>
descriptionOptional
- Type: java.lang.String
preconditionOptional
- Type: Precondition
sensitiveOptional
- Type: java.lang.Boolean
staticIdOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformOutput;
TerraformOutput.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isTerraformOutput
import com.hashicorp.cdktf.TerraformOutput;
TerraformOutput.isTerraformOutput(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
staticIdRequired
public java.lang.Boolean getStaticId();
- Type: java.lang.Boolean
valueRequired
public java.lang.Object getValue();
- Type: java.lang.Object
dependsOnOptional
public java.util.List< ITerraformDependable > getDependsOn();
- Type: java.util.List< ITerraformDependable>
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
preconditionOptional
public Precondition getPrecondition();
- Type: Precondition
sensitiveOptional
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
terraformResourceTypeRequired
- Type: java.lang.String
terraformGeneratorMetadataOptional
terraformProviderSourceOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformProvider;
TerraformProvider.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isTerraformProvider
import com.hashicorp.cdktf.TerraformProvider;
TerraformProvider.isTerraformProvider(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
metaAttributesRequired
public java.util.Map< java.lang.String, java.lang.Object > getMetaAttributes();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceTypeRequired
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadataOptional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
terraformProviderSourceOptional
public java.lang.String getTerraformProviderSource();
- Type: java.lang.String
aliasOptional
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
backendRequired
- Type: java.lang.String
defaultsOptional
- Type: java.util.Map< java.lang.String, java.lang.Object >
workspaceOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
outputRequired
- Type: java.lang.String
getBoolean
public IResolvable getBoolean(java.lang.String output)
outputRequired
- Type: java.lang.String
getList
public java.util.List< java.lang.String > getList(java.lang.String output)
outputRequired
- Type: java.lang.String
getNumber
public java.lang.Number getNumber(java.lang.String output)
outputRequired
- Type: java.lang.String
getString
public java.lang.String getString(java.lang.String output)
outputRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformRemoteState;
TerraformRemoteState.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | java.lang.String | No description. |
tfResourceTypeRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
connectionOptional
countOptional
- Type: java.lang.Number OR TerraformCount
dependsOnOptional
- Type: java.util.List< ITerraformDependable>
forEachOptional
- Type: ITerraformIterator
lifecycleOptional
providerOptional
- Type: TerraformProvider
provisionersOptional
- Type: java.util.List< FileProvisioner OR LocalExecProvisioner OR RemoteExecProvisioner>
terraformResourceTypeRequired
- Type: java.lang.String
terraformGeneratorMetadataOptional
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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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.
moveTargetRequired
- 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)
terraformAttributeRequired
- Type: java.lang.String
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- Type: java.lang.String
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- 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)
idRequired
- Type: java.lang.String
providerOptional
- Type: TerraformProvider
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String terraformAttribute)
terraformAttributeRequired
- 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.
idRequired
- 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.
moveTargetRequired
- Type: java.lang.String
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
indexOptional
- 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".
idRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformResource;
TerraformResource.isTerraformElement(java.lang.Object x)
xRequired
- Type: java.lang.Object
isTerraformResource
import com.hashicorp.cdktf.TerraformResource;
TerraformResource.isTerraformResource(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
terraformMetaArgumentsRequired
public java.util.Map< java.lang.String, java.lang.Object > getTerraformMetaArguments();
- Type: java.util.Map< java.lang.String, java.lang.Object >
terraformResourceTypeRequired
public java.lang.String getTerraformResourceType();
- Type: java.lang.String
terraformGeneratorMetadataOptional
public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata();
connectionOptional
public java.lang.Object getConnection();
countOptional
public java.lang.Object getCount();
- Type: java.lang.Number OR TerraformCount
dependsOnOptional
public java.util.List< java.lang.String > getDependsOn();
- Type: java.util.List< java.lang.String >
forEachOptional
public ITerraformIterator getForEach();
- Type: ITerraformIterator
lifecycleOptional
public TerraformResourceLifecycle getLifecycle();
providerOptional
public TerraformProvider getProvider();
- Type: TerraformProvider
provisionersOptional
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- 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)
dependencyRequired
- Type: TerraformStack
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
allProviders
public java.util.List< TerraformProvider > allProviders()
dependsOn
public java.lang.Boolean dependsOn(TerraformStack stack)
stackRequired
- Type: TerraformStack
ensureBackendExists
public TerraformBackend ensureBackendExists()
getLogicalId
public java.lang.String getLogicalId(Node OR TerraformElement tfElement)
tfElementRequired
- Type: software.constructs.Node OR TerraformElement
hasResourceMove
public java.lang.Boolean hasResourceMove()
prepareStack
public void prepareStack()
registerIncomingCrossStackReference
public TerraformRemoteState registerIncomingCrossStackReference(TerraformStack fromStack)
fromStackRequired
- Type: TerraformStack
registerOutgoingCrossStackReference
public TerraformOutput registerOutgoingCrossStackReference(java.lang.String identifier)
identifierRequired
- 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.
xRequired
- Type: java.lang.Object
Any object.
isStack
import com.hashicorp.cdktf.TerraformStack;
TerraformStack.isStack(java.lang.Object x)
xRequired
- Type: java.lang.Object
of
import com.hashicorp.cdktf.TerraformStack;
TerraformStack.of(IConstruct construct)
constructRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
dependenciesRequired
public java.util.List< TerraformStack > getDependencies();
- Type: java.util.List< TerraformStack>
moveTargetsRequired
public TerraformResourceTargets getMoveTargets();
- Type: TerraformResourceTargets
synthesizerRequired
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. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
defaultOptional
- Type: java.lang.Object
descriptionOptional
- Type: java.lang.String
nullableOptional
- Type: java.lang.Boolean
sensitiveOptional
- Type: java.lang.Boolean
typeOptional
- 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.
validationOptional
- 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)
pathRequired
- Type: java.lang.String
valueRequired
- Type: java.lang.Object
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- 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)
validationRequired
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.
xRequired
- Type: java.lang.Object
Any object.
isTerraformElement
import com.hashicorp.cdktf.TerraformVariable;
TerraformVariable.isTerraformElement(java.lang.Object x)
xRequired
- 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. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
- Type: TerraformStack
fqnRequired
public java.lang.String getFqn();
- Type: java.lang.String
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
- Type: java.lang.String
booleanValueRequired
public IResolvable getBooleanValue();
- Type: IResolvable
listValueRequired
public java.util.List< java.lang.String > getListValue();
- Type: java.util.List< java.lang.String >
numberValueRequired
public java.lang.Number getNumberValue();
- Type: java.lang.Number
stringValueRequired
public java.lang.String getStringValue();
- Type: java.lang.String
valueRequired
public java.lang.Object getValue();
- Type: java.lang.Object
defaultOptional
public java.lang.Object getDefault();
- Type: java.lang.Object
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
nullableOptional
public java.lang.Boolean getNullable();
- Type: java.lang.Boolean
sensitiveOptional
public java.lang.Boolean getSensitive();
- Type: java.lang.Boolean
typeOptional
public java.lang.String getType();
- Type: java.lang.String
validationOptional
public java.util.List< TerraformVariableValidationConfig > getValidation();
- Type: java.util.List< TerraformVariableValidationConfig>