digitalocean_spaces_buckets

Get information on Spaces buckets for use in other resources, with the ability to filter and sort the results. If no filters are specified, all Spaces buckets will be returned.

Note: You can use the digitalocean_spaces_bucket data source to obtain metadata about a single bucket if you already know its name and region.

Example Usage

Use the filter block with a key string and values list to filter buckets.

Get all buckets in a region:

data "digitalocean_spaces_buckets" "nyc3" {
  filter {
    key    = "region"
    values = ["nyc3"]
  }
}

You can sort the results as well:

data "digitalocean_spaces_buckets" "nyc3" {
  filter {
    key    = "region"
    values = ["nyc3"]
  }
  sort {
    key       = "name"
    direction = "desc"
  }
}

Argument Reference

filter supports the following arguments:

sort supports the following arguments:

Attributes Reference