alicloud_oss_bucket_meta_query

更新时间:

Provides a OSS Bucket Meta Query resource. Enables the metadata management feature for a bucket.

For information about OSS Bucket Meta Query and how to use it, see What is Bucket Meta Query.

-> NOTE: Available since v1.224.0.

Example Usage

Basic Usage


variable "name" {
  default = "terraform-example"
}

provider "alicloud" {
  region = "cn-hangzhou"
}

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_meta_query" "default" {
  bucket = alicloud_oss_bucket.CreateBucket.bucket
}

Argument Reference

The following arguments are supported:

  • bucket - (Required, ForceNew) The name of the bucket.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.
  • create_time - The creation time of the metadata index database. The format is mm:ss + TIMEZONE in the YYYY-MM-DDTHH format of RFC 3339. Where YYYY-MM-DD indicates the year, month and day, T indicates the beginning of the time element, HH:mm:ss indicates the hour, minute and second, and TIMEZONE indicates the time zone.
  • status - The status of the resource.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 5 mins) Used when create the Bucket Meta Query.
  • delete - (Defaults to 5 mins) Used when delete the Bucket Meta Query.

Import

OSS Bucket Meta Query can be imported using the id, e.g.

$ terraform import alicloud_oss_bucket_meta_query.example <id>