» alicloud_oss_bucket_objects

This data source provides the objects of an OSS bucket.

» Example Usage

data "alicloud_oss_bucket_objects" "bucket_objects_ds" {
  bucket_name = "sample_bucket"
  key_regex = "sample/sample_object.txt"
}

output "first_object_key" {
  value = "${data.alicloud_oss_bucket_objects.bucket_objects_ds.objects.0.key}"
}

» Argument Reference

The following arguments are supported:

  • bucket_name - Name of the bucket that contains the objects to find.
  • key_regex - (Optional) A regex string to filter results by key.
  • key_prefix - (Optional) Filter results by the given key prefix (such as "path/to/folder/logs-").
  • output_file - (Optional) File name where to save data source results (after running terraform plan).

» Attributes Reference

The following attributes are exported in addition to the arguments listed above:

  • objects - A list of bucket objects. Each element contains the following attributes: