Package com.hashicorp.cdktf
Class DataTerraformRemoteStateCosConfig.Builder
java.lang.Object
com.hashicorp.cdktf.DataTerraformRemoteStateCosConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DataTerraformRemoteStateCosConfig>
- Enclosing interface:
DataTerraformRemoteStateCosConfig
@Stability(Experimental)
public static final class DataTerraformRemoteStateCosConfig.Builder
extends Object
implements software.amazon.jsii.Builder<DataTerraformRemoteStateCosConfig>
A builder for
DataTerraformRemoteStateCosConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccelerate
(Boolean accelerate) Sets the value ofCosBackendConfig.getAccelerate()
Sets the value ofCosBackendConfig.getAcl()
assumeRole
(CosBackendAssumeRole assumeRole) Sets the value ofCosBackendConfig.getAssumeRole()
Sets the value ofCosBackendConfig.getBucket()
build()
Builds the configured instance.Sets the value ofDataTerraformRemoteStateConfig.getDefaults()
Sets the value ofCosBackendConfig.getDomain()
Sets the value ofCosBackendConfig.getEncrypt()
Sets the value ofCosBackendConfig.getEndpoint()
Sets the value ofCosBackendConfig.getKey()
Sets the value ofCosBackendConfig.getPrefix()
Sets the value ofCosBackendConfig.getRegion()
Sets the value ofCosBackendConfig.getSecretId()
Sets the value ofCosBackendConfig.getSecretKey()
securityToken
(String securityToken) Sets the value ofCosBackendConfig.getSecurityToken()
Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaults
@Stability(Experimental) public DataTerraformRemoteStateCosConfig.Builder defaults(Map<String, ? extends Object> defaults) Sets the value ofDataTerraformRemoteStateConfig.getDefaults()
- Parameters:
defaults
- the value to be set.- Returns:
this
-
workspace
@Stability(Experimental) public DataTerraformRemoteStateCosConfig.Builder workspace(String workspace) Sets the value ofDataTerraformRemoteStateConfig.getWorkspace()
- Parameters:
workspace
- the value to be set.- Returns:
this
-
bucket
Sets the value ofCosBackendConfig.getBucket()
- Parameters:
bucket
- (Required) The name of the COS bucket. This parameter is required. You shall manually create it first.- Returns:
this
-
accelerate
@Stability(Experimental) public DataTerraformRemoteStateCosConfig.Builder accelerate(Boolean accelerate) Sets the value ofCosBackendConfig.getAccelerate()
- Parameters:
accelerate
- (Optional) Whether to enable global Acceleration. Defaults to false.- Returns:
this
-
acl
Sets the value ofCosBackendConfig.getAcl()
- Parameters:
acl
- (Optional) Object ACL to be applied to the state file, allows private and public-read. Defaults to private.- Returns:
this
-
assumeRole
@Stability(Experimental) public DataTerraformRemoteStateCosConfig.Builder assumeRole(CosBackendAssumeRole assumeRole) Sets the value ofCosBackendConfig.getAssumeRole()
- Parameters:
assumeRole
- (Optional) The assume_role block. If provided, terraform will attempt to assume this role using the supplied credentials.- Returns:
this
-
domain
Sets the value ofCosBackendConfig.getDomain()
- Parameters:
domain
- (Optional) The root domain of the API request. Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.- Returns:
this
-
encrypt
Sets the value ofCosBackendConfig.getEncrypt()
- Parameters:
encrypt
- (Optional) Whether to enable server side encryption of the state file. If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.- Returns:
this
-
endpoint
Sets the value ofCosBackendConfig.getEndpoint()
- Parameters:
endpoint
- (Optional) The Custom Endpoint for the COS backend. It supports the environment variable TENCENTCLOUD_ENDPOINT.- Returns:
this
-
key
Sets the value ofCosBackendConfig.getKey()
- Parameters:
key
- (Optional) The path for saving the state file in bucket. Defaults to terraform.tfstate.- Returns:
this
-
prefix
Sets the value ofCosBackendConfig.getPrefix()
- Parameters:
prefix
- (Optional) The directory for saving the state file in bucket. Default to "env:".- Returns:
this
-
region
Sets the value ofCosBackendConfig.getRegion()
- Parameters:
region
- (Optional) The region of the COS bucket. It supports environment variables TENCENTCLOUD_REGION.- Returns:
this
-
secretId
Sets the value ofCosBackendConfig.getSecretId()
- Parameters:
secretId
- (Optional) Secret id of Tencent Cloud. It supports environment variables TENCENTCLOUD_SECRET_ID.- Returns:
this
-
secretKey
@Stability(Experimental) public DataTerraformRemoteStateCosConfig.Builder secretKey(String secretKey) Sets the value ofCosBackendConfig.getSecretKey()
- Parameters:
secretKey
- (Optional) Secret key of Tencent Cloud. It supports environment variables TENCENTCLOUD_SECRET_KEY.- Returns:
this
-
securityToken
@Stability(Experimental) public DataTerraformRemoteStateCosConfig.Builder securityToken(String securityToken) Sets the value ofCosBackendConfig.getSecurityToken()
- Parameters:
securityToken
- (Optional) TencentCloud Security Token of temporary access credentials. It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DataTerraformRemoteStateCosConfig>
- Returns:
- a new instance of
DataTerraformRemoteStateCosConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-