frostmoln_tenant_quotas (Data Source)
Reads the quota limits and current usage of the provider's tenant, keyed by resource type (e.g. vcpu, ram, volume, registry_storage, image, image_storage). A limit of 0 means no allowance; there is no "unlimited" value. Each value is in its counter's own unit. The set of resource types is defined by the server, so new keys can appear without a provider release. Only the tenant view is available: the organization-wide report is not served to API keys. To raise a limit, request an increase on the portal's Quotas page or with fm tenant quota request. The image and image_storage keys are always present (limit 0 when the tenant has no custom-image allowance). The read fails if either the provisioning or the compute quota endpoint is unavailable.
Example Usage
data "frostmoln_tenant_quotas" "this" {}
# vCPUs still available in the tenant. used is null when usage is unknown.
output "vcpu_available" {
value = data.frostmoln_tenant_quotas.this.quotas["vcpu"].used == null ? null : (
data.frostmoln_tenant_quotas.this.quotas["vcpu"].limit - data.frostmoln_tenant_quotas.this.quotas["vcpu"].used
)
}Schema
Read-Only
quotas(Attributes Map) The tenant's quotas, keyed by resource type. (see below for nested schema)
Nested Schema for quotas
Read-Only:
limit(Number) The tenant's limit for this resource type, inunit. 0 means no allowance.unit(String) The counter's unit:count,gb(gigabytes as the platform reports them; block-storage sizes follow the volume size unit) ormb(megabytes; onlyram, where 1 GB = 1024 MB).used(Number) Current usage, inunit. Null when the platform cannot currently report usage for this resource type; null means unknown and is never zero.