Class DataTerraformRemoteStateS3.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DataTerraformRemoteStateS3>
- Enclosing class:
DataTerraformRemoteStateS3
DataTerraformRemoteStateS3
.-
Method Summary
Modifier and TypeMethodDescription(experimental) (Optional) AWS access key.(experimental) (Optional) Canned ACL to be applied to the state file.assumeRolePolicy
(String assumeRolePolicy) (experimental) (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.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.assumeRoleTags
(Map<String, String> assumeRoleTags) (experimental) (Optional) Map of assume role session tags.assumeRoleTransitiveTagKeys
(List<String> assumeRoleTransitiveTagKeys) (experimental) (Optional) Set of assume role session tag keys to pass to any subsequent sessions.(experimental) Name of the S3 Bucket.build()
dynamodbEndpoint
(String dynamodbEndpoint) (experimental) (Optional) Custom endpoint for the AWS DynamoDB API.dynamodbTable
(String dynamodbTable) (experimental) (Optional) Name of DynamoDB Table to use for state locking and consistency.(experimental) (Optional) Enable server side encryption of the state file.(experimental) (Optional) Custom endpoint for the AWS S3 API.externalId
(String externalId) (experimental) (Optional) External identifier to use when assuming the role.forcePathStyle
(Boolean forcePathStyle) (experimental) (Optional) Enable path-style S3 URLs (https:/// instead of https:// . ). iamEndpoint
(String iamEndpoint) (experimental) (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.(experimental) Path to the state file inside the S3 Bucket.(experimental) (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.maxRetries
(Number maxRetries) (experimental) (Optional) The maximum number of times an AWS API request is retried on retryable failure.(experimental) (Optional) Name of AWS profile in AWS shared credentials file (e.g.(experimental) AWS Region of the S3 Bucket and DynamoDB Table (if used).(experimental) (Optional) Amazon Resource Name (ARN) of the IAM Role to assume.(experimental) (Optional) AWS secret access key.sessionName
(String sessionName) (experimental) (Optional) Session name to use when assuming the role.sharedCredentialsFile
(String sharedCredentialsFile) (experimental) (Optional) Path to the AWS shared credentials file.skipCredentialsValidation
(Boolean skipCredentialsValidation) (experimental) (Optional) Skip credentials validation via the STS API.skipMetadataApiCheck
(Boolean skipMetadataApiCheck) (experimental) (Optional) Skip usage of EC2 Metadata API.skipRegionValidation
(Boolean skipRegionValidation) (experimental) (Optional) Skip validation of provided region name.sseCustomerKey
(String sseCustomerKey) (experimental) (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).stsEndpoint
(String stsEndpoint) (experimental) (Optional) Custom endpoint for the AWS Security Token Service (STS) API.(experimental) (Optional) Multi-Factor Authentication (MFA) token.workspaceKeyPrefix
(String workspaceKeyPrefix) (experimental) (Optional) Prefix applied to the state path inside the bucket.
-
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
- Parameters:
workspace
- This parameter is required.- Returns:
this
-
bucket
(experimental) Name of the S3 Bucket.- Parameters:
bucket
- Name of the S3 Bucket. This parameter is required.- Returns:
this
-
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
(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
(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
(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
(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
(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
(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
(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
(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
(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
(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
(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
(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
(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
-
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
(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
(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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DataTerraformRemoteStateS3>
-