Skip to main content

Initializers

import io.cdktn.cdktn.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();
NameTypeDescription
scopesoftware.constructs.ConstructNo description.
idjava.lang.StringNo description.
defaultsjava.util.Map< java.lang.String, java.lang.Object >No description.
workspacejava.lang.StringNo description.
bucketjava.lang.StringName of the S3 Bucket.
keyjava.lang.StringPath to the state file inside the S3 Bucket.
accessKeyjava.lang.String(Optional) AWS access key.
acljava.lang.String(Optional) Canned ACL to be applied to the state file.
allowedAccountIdsjava.util.List< java.lang.String >(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
assumeRoleS3BackendAssumeRoleConfigAssuming an IAM Role can be configured in two ways.
assumeRolePolicyjava.lang.String(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assumeRolePolicyArnsjava.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.
assumeRoleTagsjava.util.Map< java.lang.String, java.lang.String >(Optional) Map of assume role session tags.
assumeRoleTransitiveTagKeysjava.util.List< java.lang.String >(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
assumeRoleWithWebIdentityS3BackendAssumeRoleWithWebIdentityConfigAssume Role With Web Identity Configuration.
customCaBundlejava.lang.String(Optional) File containing custom root and intermediate certificates.
dynamodbEndpointjava.lang.String(Optional) Custom endpoint for the AWS DynamoDB API.
dynamodbTablejava.lang.String(Optional) Name of DynamoDB Table to use for state locking and consistency.
ec2MetadataServiceEndpointjava.lang.StringOptional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
ec2MetadataServiceEndpointModejava.lang.String(Optional) Mode to use in communicating with the metadata service.
encryptjava.lang.Boolean(Optional) Enable server side encryption of the state file.
endpointjava.lang.String(Optional) Custom endpoint for the AWS S3 API.
endpointsS3BackendEndpointConfig(Optional) The endpoint configuration block.
externalIdjava.lang.String(Optional) External identifier to use when assuming the role.
forbiddenAccountIdsjava.util.List< java.lang.String >(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
forcePathStylejava.lang.Boolean(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
httpProxyjava.lang.String(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
httpsProxyjava.lang.String(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
iamEndpointjava.lang.String(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
insecurejava.lang.BooleanOptional) Whether to explicitly allow the backend to perform “insecure” SSL requests.
kmsKeyIdjava.lang.String(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
maxRetriesjava.lang.Number(Optional) The maximum number of times an AWS API request is retried on retryable failure.
noProxyjava.lang.String(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
profilejava.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.
regionjava.lang.StringAWS Region of the S3 Bucket and DynamoDB Table (if used).
retryModejava.lang.String(Optional) Specifies how retries are attempted.
roleArnjava.lang.String(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secretKeyjava.lang.String(Optional) AWS secret access key.
sessionNamejava.lang.String(Optional) Session name to use when assuming the role.
sharedConfigFilesjava.util.List< java.lang.String >(Optional) List of paths to AWS shared configuration files.
sharedCredentialsFilejava.lang.String(Optional) Path to the AWS shared credentials file.
sharedCredentialsFilesjava.util.List< java.lang.String >(Optional) List of paths to AWS shared credentials files.
skipCredentialsValidationjava.lang.Boolean(Optional) Skip credentials validation via the STS API.
skipMetadataApiCheckjava.lang.Boolean(Optional) Skip usage of EC2 Metadata API.
skipRegionValidationjava.lang.Boolean(Optional) Skip validation of provided region name.
skipRequestingAccountIdjava.lang.Boolean(Optional) Whether to skip requesting the account ID.
skipS3Checksumjava.lang.Boolean(Optional) Do not include checksum when uploading S3 Objects.
sseCustomerKeyjava.lang.String(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
stsEndpointjava.lang.String(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
stsRegionjava.lang.String(Optional) AWS region for STS.
tokenjava.lang.String(Optional) Multi-Factor Authentication (MFA) token.
useLegacyWorkflowjava.lang.Boolean(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
usePathStylejava.lang.Boolean(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
workspaceKeyPrefixjava.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

  • Deprecated: Use assumeRole.policy instead.
  • Type: java.lang.String
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.

assumeRolePolicyArnsOptional

  • Deprecated: Use assumeRole.policyArns instead.
  • Type: java.util.List< java.lang.String >
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.

assumeRoleTagsOptional

  • Deprecated: Use assumeRole.tags instead.
  • Type: java.util.Map< java.lang.String, java.lang.String >
(Optional) Map of assume role session tags.

assumeRoleTransitiveTagKeysOptional

  • Deprecated: Use assumeRole.transitiveTagKeys instead.
  • Type: java.util.List< java.lang.String >
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.

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

  • Deprecated: Use endpoints.dynamodb instead
  • Type: java.lang.String
(Optional) Custom endpoint for the AWS DynamoDB API. This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.

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

  • Deprecated: Use endpoints.s3 instead
  • Type: java.lang.String
(Optional) Custom endpoint for the AWS S3 API. This can also be sourced from the AWS_S3_ENDPOINT environment variable.

endpointsOptional

(Optional) The endpoint configuration block.

externalIdOptional

  • Deprecated: 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

  • Deprecated: 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

  • Deprecated: Use endpoints.iam instead
  • Type: java.lang.String
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. This can also be sourced from the AWS_IAM_ENDPOINT environment variable.

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

  • Deprecated: 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

  • Deprecated: 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

  • Deprecated: Use endpoints.sts instead
  • Type: java.lang.String
(Optional) Custom endpoint for the AWS Security Token Service (STS) API. This can also be sourced from the AWS_STS_ENDPOINT environment variable.

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

NameDescription
toStringReturns a string representation of this construct.
addOverrideNo description.
overrideLogicalIdOverrides the auto-generated logical ID with a specific ID.
resetOverrideLogicalIdResets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraformAdds this resource to the terraform JSON output.
toMetadataNo description.
toTerraformAdds this resource to the terraform JSON output.
getNo description.
getBooleanNo description.
getListNo description.
getNumberNo description.
getStringNo 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

NameDescription
isConstructChecks if x is a construct.
isTerraformElementNo description.

isConstruct

import io.cdktn.cdktn.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 io.cdktn.cdktn.DataTerraformRemoteStateS3;

DataTerraformRemoteStateS3.isTerraformElement(java.lang.Object x)

xRequired

  • Type: java.lang.Object

Properties

NameTypeDescription
nodesoftware.constructs.NodeThe tree node.
cdktfStackTerraformStackNo description.
fqnjava.lang.StringNo description.
friendlyUniqueIdjava.lang.StringNo description.

nodeRequired

public Node getNode();
  • Type: software.constructs.Node
The tree node.

cdktfStackRequired

public TerraformStack getCdktfStack();

fqnRequired

public java.lang.String getFqn();
  • Type: java.lang.String

friendlyUniqueIdRequired

public java.lang.String getFriendlyUniqueId();
  • Type: java.lang.String

Constants

NameTypeDescription
tfResourceTypejava.lang.StringNo description.

tfResourceTypeRequired

public java.lang.String getTfResourceType();
  • Type: java.lang.String