Provides a OSS Bucket Https Config resource. Whether the bucket can only be accessed with specific TLS versions.
For information about OSS Bucket Https Config and how to use it, see What is Bucket Https Config.
Basic Usage
variable "name" {
default = "terraform-example"
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_oss_bucket" "CreateBucket" {
storage_class = "Standard"
bucket = "${var.name}-${random_integer.default.result}"
}
resource "alicloud_oss_bucket_https_config" "default" {
tls_versions = ["TLSv1.2"]
bucket = alicloud_oss_bucket.CreateBucket.bucket
enable = true
}
alicloud_oss_bucket_https_config
or removing it from your configurationTerraform cannot destroy resource alicloud_oss_bucket_https_config
. Terraform will remove this resource from the state file, however resources may remain.
The following arguments are supported:
bucket
- (Required, ForceNew) The name of the bucket.enable
- (Required) Specifies whether to enable TLS version management for the bucket. Valid values: true, false.tls_versions
- (Optional) Specifies the TLS versions allowed to access this buckets.The following attributes are exported:
id
- The ID of the resource supplied above.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Bucket Https Config.update
- (Defaults to 5 mins) Used when update the Bucket Https Config.OSS Bucket Https Config can be imported using the id, e.g.
$ terraform import alicloud_oss_bucket_https_config.example <id>