@Stability(value=Experimental) public static final class DataTerraformRemoteStateS3Config.Builder extends Object implements software.amazon.jsii.Builder<DataTerraformRemoteStateS3Config>
DataTerraformRemoteStateS3Config
Constructor and Description |
---|
Builder() |
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder defaults(Map<String,? extends Object> defaults)
DataTerraformRemoteStateConfig.getDefaults()
defaults
- the value to be set.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder workspace(String workspace)
DataTerraformRemoteStateConfig.getWorkspace()
workspace
- the value to be set.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder bucket(String bucket)
S3BackendConfig.getBucket()
bucket
- Name of the S3 Bucket. This parameter is required.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder key(String key)
S3BackendConfig.getKey()
key
- Path to the state file inside the S3 Bucket. This parameter is required.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/keythis
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder accessKey(String accessKey)
S3BackendConfig.getAccessKey()
accessKey
- (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).this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder acl(String acl)
S3BackendConfig.getAcl()
acl
- (Optional) Canned ACL to be applied to the state file.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder assumeRolePolicy(String assumeRolePolicy)
S3BackendConfig.getAssumeRolePolicy()
assumeRolePolicy
- (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder assumeRolePolicyArns(List<String> assumeRolePolicyArns)
S3BackendConfig.getAssumeRolePolicyArns()
assumeRolePolicyArns
- (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder assumeRoleTags(Map<String,String> assumeRoleTags)
S3BackendConfig.getAssumeRoleTags()
assumeRoleTags
- (Optional) Map of assume role session tags.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder assumeRoleTransitiveTagKeys(List<String> assumeRoleTransitiveTagKeys)
S3BackendConfig.getAssumeRoleTransitiveTagKeys()
assumeRoleTransitiveTagKeys
- (Optional) Set of assume role session tag keys to pass to any subsequent sessions.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder dynamodbEndpoint(String dynamodbEndpoint)
S3BackendConfig.getDynamodbEndpoint()
dynamodbEndpoint
- (Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder dynamodbTable(String dynamodbTable)
S3BackendConfig.getDynamodbTable()
dynamodbTable
- (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.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder encrypt(Boolean encrypt)
S3BackendConfig.getEncrypt()
encrypt
- (Optional) Enable server side encryption of the state file.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder endpoint(String endpoint)
S3BackendConfig.getEndpoint()
endpoint
- (Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder externalId(String externalId)
S3BackendConfig.getExternalId()
externalId
- (Optional) External identifier to use when assuming the role.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder forcePathStyle(Boolean forcePathStyle)
S3BackendConfig.getForcePathStyle()
forcePathStyle
- (Optional) Enable path-style S3 URLs (https://this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder iamEndpoint(String iamEndpoint)
S3BackendConfig.getIamEndpoint()
iamEndpoint
- (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder kmsKeyId(String kmsKeyId)
S3BackendConfig.getKmsKeyId()
kmsKeyId
- (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.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder maxRetries(Number maxRetries)
S3BackendConfig.getMaxRetries()
maxRetries
- (Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder profile(String profile)
S3BackendConfig.getProfile()
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
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder region(String region)
S3BackendConfig.getRegion()
region
- 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.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder roleArn(String roleArn)
S3BackendConfig.getRoleArn()
roleArn
- (Optional) Amazon Resource Name (ARN) of the IAM Role to assume.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder secretKey(String secretKey)
S3BackendConfig.getSecretKey()
secretKey
- (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)this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder sessionName(String sessionName)
S3BackendConfig.getSessionName()
sessionName
- (Optional) Session name to use when assuming the role.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder sharedCredentialsFile(String sharedCredentialsFile)
S3BackendConfig.getSharedCredentialsFile()
sharedCredentialsFile
- (Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder skipCredentialsValidation(Boolean skipCredentialsValidation)
S3BackendConfig.getSkipCredentialsValidation()
skipCredentialsValidation
- (Optional) Skip credentials validation via the STS API.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder skipMetadataApiCheck(Boolean skipMetadataApiCheck)
S3BackendConfig.getSkipMetadataApiCheck()
skipMetadataApiCheck
- (Optional) Skip usage of EC2 Metadata API.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder skipRegionValidation(Boolean skipRegionValidation)
S3BackendConfig.getSkipRegionValidation()
skipRegionValidation
- (Optional) Skip validation of provided region name.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder sseCustomerKey(String sseCustomerKey)
S3BackendConfig.getSseCustomerKey()
sseCustomerKey
- (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.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder stsEndpoint(String stsEndpoint)
S3BackendConfig.getStsEndpoint()
stsEndpoint
- (Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder token(String token)
S3BackendConfig.getToken()
token
- (Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder workspaceKeyPrefix(String workspaceKeyPrefix)
S3BackendConfig.getWorkspaceKeyPrefix()
workspaceKeyPrefix
- (Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config build()
build
in interface software.amazon.jsii.Builder<DataTerraformRemoteStateS3Config>
DataTerraformRemoteStateS3Config
NullPointerException
- if any required attribute was not providedCopyright © 2023. All rights reserved.