@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)
S3BackendProps.getBucket()
bucket
- Name of the S3 Bucket. This parameter is required.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder key(String key)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.getAcl()
acl
- (Optional) Canned ACL to be applied to the state file.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder assumeRolePolicy(String assumeRolePolicy)
S3BackendProps.getAssumeRolePolicy()
assumeRolePolicy
- (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder dynamodbEndpoint(String dynamodbEndpoint)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.getEncrypt()
encrypt
- (Optional) Enable server side encryption of the state file.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder endpoint(String endpoint)
S3BackendProps.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)
S3BackendProps.getExternalId()
externalId
- (Optional) External identifier to use when assuming the role.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder forcePathStyle(Boolean forcePathStyle)
S3BackendProps.getForcePathStyle()
forcePathStyle
- (Optional) Enable path-style S3 URLs (https://this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder iamEndpoint(String iamEndpoint)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.getRoleArn()
roleArn
- (Optional) Amazon Resource Name (ARN) of the IAM Role to assume.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder secretKey(String secretKey)
S3BackendProps.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)
S3BackendProps.getSessionName()
sessionName
- (Optional) Session name to use when assuming the role.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder sharedCredentialsFile(String sharedCredentialsFile)
S3BackendProps.getSharedCredentialsFile()
sharedCredentialsFile
- (Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder skipCredentialsValidation(Boolean skipCredentialsValidation)
S3BackendProps.getSkipCredentialsValidation()
skipCredentialsValidation
- (Optional) Skip credentials validation via the STS API.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder skipMetadataApiCheck(Boolean skipMetadataApiCheck)
S3BackendProps.getSkipMetadataApiCheck()
skipMetadataApiCheck
- (Optional) Skip usage of EC2 Metadata API.this
@Stability(value=Experimental) public DataTerraformRemoteStateS3Config.Builder sseCustomerKey(String sseCustomerKey)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.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)
S3BackendProps.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 © 2022. All rights reserved.