Class DataTerraformRemoteStateS3.Builder

java.lang.Object
com.hashicorp.cdktf.DataTerraformRemoteStateS3.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<DataTerraformRemoteStateS3>
Enclosing class:
DataTerraformRemoteStateS3

@Stability(Experimental) public static final class DataTerraformRemoteStateS3.Builder extends Object implements software.amazon.jsii.Builder<DataTerraformRemoteStateS3>
(experimental) A fluent builder for DataTerraformRemoteStateS3.
  • Method Details

    • create

      @Stability(Experimental) public static DataTerraformRemoteStateS3.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of DataTerraformRemoteStateS3.Builder.
    • defaults

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder defaults(Map<String,? extends Object> defaults)
      Parameters:
      defaults - This parameter is required.
      Returns:
      this
    • workspace

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder workspace(String workspace)
      Parameters:
      workspace - This parameter is required.
      Returns:
      this
    • bucket

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder bucket(String bucket)
      (experimental) Name of the S3 Bucket.

      Parameters:
      bucket - Name of the S3 Bucket. This parameter is required.
      Returns:
      this
    • key

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder key(String key)
      (experimental) 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

      Parameters:
      key - Path to the state file inside the S3 Bucket. This parameter is required.
      Returns:
      this
    • accessKey

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder accessKey(String accessKey)
      (experimental) (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).

      Parameters:
      accessKey - (Optional) AWS access key. This parameter is required.
      Returns:
      this
    • acl

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder acl(String acl)
      (experimental) (Optional) Canned ACL to be applied to the state file.

      Parameters:
      acl - (Optional) Canned ACL to be applied to the state file. This parameter is required.
      Returns:
      this
    • assumeRolePolicy

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder assumeRolePolicy(String assumeRolePolicy)
      (experimental) (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.

      Parameters:
      assumeRolePolicy - (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. This parameter is required.
      Returns:
      this
    • assumeRolePolicyArns

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder assumeRolePolicyArns(List<String> assumeRolePolicyArns)
      (experimental) (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.

      Parameters:
      assumeRolePolicyArns - (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. This parameter is required.
      Returns:
      this
    • assumeRoleTags

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder assumeRoleTags(Map<String,String> assumeRoleTags)
      (experimental) (Optional) Map of assume role session tags.

      Parameters:
      assumeRoleTags - (Optional) Map of assume role session tags. This parameter is required.
      Returns:
      this
    • assumeRoleTransitiveTagKeys

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder assumeRoleTransitiveTagKeys(List<String> assumeRoleTransitiveTagKeys)
      (experimental) (Optional) Set of assume role session tag keys to pass to any subsequent sessions.

      Parameters:
      assumeRoleTransitiveTagKeys - (Optional) Set of assume role session tag keys to pass to any subsequent sessions. This parameter is required.
      Returns:
      this
    • dynamodbEndpoint

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder dynamodbEndpoint(String dynamodbEndpoint)
      (experimental) (Optional) Custom endpoint for the AWS DynamoDB API.

      This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.

      Parameters:
      dynamodbEndpoint - (Optional) Custom endpoint for the AWS DynamoDB API. This parameter is required.
      Returns:
      this
    • dynamodbTable

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder dynamodbTable(String dynamodbTable)
      (experimental) (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.

      Parameters:
      dynamodbTable - (Optional) Name of DynamoDB Table to use for state locking and consistency. This parameter is required.
      Returns:
      this
    • encrypt

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder encrypt(Boolean encrypt)
      (experimental) (Optional) Enable server side encryption of the state file.

      Parameters:
      encrypt - (Optional) Enable server side encryption of the state file. This parameter is required.
      Returns:
      this
    • endpoint

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder endpoint(String endpoint)
      (experimental) (Optional) Custom endpoint for the AWS S3 API.

      This can also be sourced from the AWS_S3_ENDPOINT environment variable.

      Parameters:
      endpoint - (Optional) Custom endpoint for the AWS S3 API. This parameter is required.
      Returns:
      this
    • externalId

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder externalId(String externalId)
      (experimental) (Optional) External identifier to use when assuming the role.

      Parameters:
      externalId - (Optional) External identifier to use when assuming the role. This parameter is required.
      Returns:
      this
    • forcePathStyle

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder forcePathStyle(Boolean forcePathStyle)
      (experimental) (Optional) Enable path-style S3 URLs (https:/// instead of https://.).

      Parameters:
      forcePathStyle - (Optional) Enable path-style S3 URLs (https:/// instead of https://.). This parameter is required.
      Returns:
      this
    • iamEndpoint

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder iamEndpoint(String iamEndpoint)
      (experimental) (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.

      This can also be sourced from the AWS_IAM_ENDPOINT environment variable.

      Parameters:
      iamEndpoint - (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. This parameter is required.
      Returns:
      this
    • kmsKeyId

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder kmsKeyId(String kmsKeyId)
      (experimental) (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.

      Parameters:
      kmsKeyId - (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. This parameter is required.
      Returns:
      this
    • maxRetries

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder maxRetries(Number maxRetries)
      (experimental) (Optional) The maximum number of times an AWS API request is retried on retryable failure.

      Defaults to 5.

      Parameters:
      maxRetries - (Optional) The maximum number of times an AWS API request is retried on retryable failure. This parameter is required.
      Returns:
      this
    • profile

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder profile(String profile)
      (experimental) (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.

      Parameters:
      profile - (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. This parameter is required.
      Returns:
      this
    • region

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder region(String region)
      (experimental) 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.

      Parameters:
      region - AWS Region of the S3 Bucket and DynamoDB Table (if used). This parameter is required.
      Returns:
      this
    • roleArn

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder roleArn(String roleArn)
      (experimental) (Optional) Amazon Resource Name (ARN) of the IAM Role to assume.

      Parameters:
      roleArn - (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. This parameter is required.
      Returns:
      this
    • secretKey

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder secretKey(String secretKey)
      (experimental) (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)

      Parameters:
      secretKey - (Optional) AWS secret access key. This parameter is required.
      Returns:
      this
    • sessionName

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder sessionName(String sessionName)
      (experimental) (Optional) Session name to use when assuming the role.

      Parameters:
      sessionName - (Optional) Session name to use when assuming the role. This parameter is required.
      Returns:
      this
    • sharedCredentialsFile

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder sharedCredentialsFile(String sharedCredentialsFile)
      (experimental) (Optional) Path to the AWS shared credentials file.

      Defaults to ~/.aws/credentials.

      Parameters:
      sharedCredentialsFile - (Optional) Path to the AWS shared credentials file. This parameter is required.
      Returns:
      this
    • skipCredentialsValidation

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder skipCredentialsValidation(Boolean skipCredentialsValidation)
      (experimental) (Optional) Skip credentials validation via the STS API.

      Parameters:
      skipCredentialsValidation - (Optional) Skip credentials validation via the STS API. This parameter is required.
      Returns:
      this
    • skipMetadataApiCheck

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder skipMetadataApiCheck(Boolean skipMetadataApiCheck)
      (experimental) (Optional) Skip usage of EC2 Metadata API.

      Parameters:
      skipMetadataApiCheck - (Optional) Skip usage of EC2 Metadata API. This parameter is required.
      Returns:
      this
    • skipRegionValidation

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder skipRegionValidation(Boolean skipRegionValidation)
      (experimental) (Optional) Skip validation of provided region name.

      Parameters:
      skipRegionValidation - (Optional) Skip validation of provided region name. This parameter is required.
      Returns:
      this
    • sseCustomerKey

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder sseCustomerKey(String sseCustomerKey)
      (experimental) (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.

      Parameters:
      sseCustomerKey - (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). This parameter is required.
      Returns:
      this
    • stsEndpoint

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder stsEndpoint(String stsEndpoint)
      (experimental) (Optional) Custom endpoint for the AWS Security Token Service (STS) API.

      This can also be sourced from the AWS_STS_ENDPOINT environment variable.

      Parameters:
      stsEndpoint - (Optional) Custom endpoint for the AWS Security Token Service (STS) API. This parameter is required.
      Returns:
      this
    • token

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder token(String token)
      (experimental) (Optional) Multi-Factor Authentication (MFA) token.

      This can also be sourced from the AWS_SESSION_TOKEN environment variable.

      Parameters:
      token - (Optional) Multi-Factor Authentication (MFA) token. This parameter is required.
      Returns:
      this
    • workspaceKeyPrefix

      @Stability(Experimental) public DataTerraformRemoteStateS3.Builder workspaceKeyPrefix(String workspaceKeyPrefix)
      (experimental) (Optional) Prefix applied to the state path inside the bucket.

      This is only relevant when using a non-default workspace. Defaults to env:

      Parameters:
      workspaceKeyPrefix - (Optional) Prefix applied to the state path inside the bucket. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public DataTerraformRemoteStateS3 build()
      Specified by:
      build in interface software.amazon.jsii.Builder<DataTerraformRemoteStateS3>