dtcloud_storage_policies (Data Source)
Lists the storage policies available in the region.
storage_policy is required on every volume and has no default, so this is how to find the valid
values. The endpoint returns only the policies with a non-zero quota for the project, so what comes
back is what this project can actually create volumes on, not the whole platform catalogue.
Example Usage
data "dtcloud_storage_policies" "available" {}
output "policy_names" {
value = data.dtcloud_storage_policies.available.names
}
Schema
Optional
name(String) Only return the policy with this exact name. Applied by the provider — the API has no filter.
Read-Only
id(String) The ID of this resource.names(List of String) Just the policy names, for when all you need is to check one is available.policies(List of Object) Storage policies this project has quota for. (see below for nested schema)
Nested Schema for policies
Read-Only:
id(String)name(String)
Behaviour worth knowing
warning
Pass the name, not the id. The volume details endpoint reports the policy by name, so a
volume created with an id reads back as a name and every later plan proposes a change that never
converges.
nameis applied by the provider and must match exactly.