Skip to main content

Initializer

import "github.com/open-constructs/cdk-terrain-go/cdktn"

&cdktn.DataTerraformRemoteStateCosConfig {
	Defaults: *map[string]interface{},
	Workspace: *string,
	Bucket: *string,
	Accelerate: *bool,
	Acl: *string,
	AssumeRole: github.com/open-constructs/cdk-terrain-go/cdktn.CosBackendAssumeRole,
	Domain: *string,
	Encrypt: *bool,
	Endpoint: *string,
	Key: *string,
	Prefix: *string,
	Region: *string,
	SecretId: *string,
	SecretKey: *string,
	SecurityToken: *string,
}

Properties

NameTypeDescription
Defaults*map[string]interface{}No description.
Workspace*stringNo description.
Bucket*string(Required) The name of the COS bucket.
Accelerate*bool(Optional) Whether to enable global Acceleration.
Acl*string(Optional) Object ACL to be applied to the state file, allows private and public-read.
AssumeRoleCosBackendAssumeRole(Optional) The assume_role block.
Domain*string(Optional) The root domain of the API request.
Encrypt*bool(Optional) Whether to enable server side encryption of the state file.
Endpoint*string(Optional) The Custom Endpoint for the COS backend.
Key*string(Optional) The path for saving the state file in bucket.
Prefix*string(Optional) The directory for saving the state file in bucket.
Region*string(Optional) The region of the COS bucket.
SecretId*string(Optional) Secret id of Tencent Cloud.
SecretKey*string(Optional) Secret key of Tencent Cloud.
SecurityToken*string(Optional) TencentCloud Security Token of temporary access credentials.

DefaultsOptional

Defaults *map[string]interface{}
  • Type: *map[string]interface{}

WorkspaceOptional

Workspace *string
  • Type: *string

BucketRequired

Bucket *string
  • Type: *string
(Required) The name of the COS bucket. You shall manually create it first.

AccelerateOptional

Accelerate *bool
  • Type: *bool
(Optional) Whether to enable global Acceleration. Defaults to false.

AclOptional

Acl *string
  • Type: *string
(Optional) Object ACL to be applied to the state file, allows private and public-read. Defaults to private.

AssumeRoleOptional

AssumeRole CosBackendAssumeRole
(Optional) The assume_role block. If provided, terraform will attempt to assume this role using the supplied credentials.

DomainOptional

Domain *string
  • Type: *string
(Optional) The root domain of the API request. Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.

EncryptOptional

Encrypt *bool
  • Type: *bool
(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.

EndpointOptional

Endpoint *string
  • Type: *string
(Optional) The Custom Endpoint for the COS backend. It supports the environment variable TENCENTCLOUD_ENDPOINT.

KeyOptional

Key *string
  • Type: *string
(Optional) The path for saving the state file in bucket. Defaults to terraform.tfstate.

PrefixOptional

Prefix *string
  • Type: *string
(Optional) The directory for saving the state file in bucket. Default to “env:”.

RegionOptional

Region *string
  • Type: *string
(Optional) The region of the COS bucket. It supports environment variables TENCENTCLOUD_REGION.

SecretIdOptional

SecretId *string
  • Type: *string
(Optional) Secret id of Tencent Cloud. It supports environment variables TENCENTCLOUD_SECRET_ID.

SecretKeyOptional

SecretKey *string
  • Type: *string
(Optional) Secret key of Tencent Cloud. It supports environment variables TENCENTCLOUD_SECRET_KEY.

SecurityTokenOptional

SecurityToken *string
  • Type: *string
(Optional) TencentCloud Security Token of temporary access credentials. It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.