Data Sources
zsphere_local_primary_storages
List all local primary storages, or query local primary storages by exact name match, or query local primary storages by name pattern fuzzy match.
zsphere_local_primary_storages (Data Source)
List all local primary storages, or query local primary storages by exact name match, or query local primary storages by name pattern fuzzy match.
Example Usage
data "zsphere_local_primary_storages" "test" {
}
output "zsphere_local_storages" {
value = data.zsphere_local_primary_storages.test
}
# Example output:
# zsphere_local_storages = {
# "filter" = tolist([])
# "local_storages" = tolist([
# {
# "available_capacity" = 50000000000
# "available_physical_capacity" = 50000000000
# "mount_path" = "/vms_ds"
# "name" = "LocalStorage-1"
# "state" = "Enabled"
# "status" = "Connected"
# "system_used_capacity" = 0
# "total_capacity" = 100000000000
# "total_physical_capacity" = 100000000000
# "type" = "LocalStorage"
# "url" = "/vms_ds"
# "uuid" = "d1058cff5c864a84848e0ab896736578"
# "zone_uuid" = "86643f5442164890b8b71de5b582dc9f"
# },
# ])
# "name" = tostring(null)
# "name_pattern" = tostring(null)
# }Schema
Optional
filter(Block List) Filter resources based on any field in the schema. For example, to filter by status, usename = "status"andvalues = ["Ready"]. (see below for nested schema)name(String) Exact name for searching local primary storage.name_pattern(String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
Read-Only
local_storages(Attributes List) List of local primary storage entries (see below for nested schema)
Nested Schema for filter
Required:
name(String) Name of the field to filter by (e.g., status, state).values(Set of String) Values to filter by. Multiple values will be treated as an OR condition.
Nested Schema for local_storages
Read-Only:
available_capacity(Number) Available capacity of the local primary storage in bytesavailable_physical_capacity(Number) Available physical capacity of the local primary storage in bytesdatacenter_uuid(String) Datacenter UUID of the local primary storagemount_path(String) Mount path of the local primary storagename(String) Name of the local primary storagestate(String) State of the local primary storage (Enabled or Disabled)status(String) Readiness status of the local primary storagesystem_used_capacity(Number) System used capacity of the local primary storage in bytestotal_capacity(Number) Total capacity of the local primary storage in bytestotal_physical_capacity(Number) Total physical capacity of the local primary storage in bytestype(String) Type of the local primary storageurl(String) URL of the local primary storageuuid(String) UUID identifier of the local primary storage