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, use name = "status" and values = ["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

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 bytes
  • available_physical_capacity (Number) Available physical capacity of the local primary storage in bytes
  • datacenter_uuid (String) Datacenter UUID of the local primary storage
  • mount_path (String) Mount path of the local primary storage
  • name (String) Name of the local primary storage
  • state (String) State of the local primary storage (Enabled or Disabled)
  • status (String) Readiness status of the local primary storage
  • system_used_capacity (Number) System used capacity of the local primary storage in bytes
  • total_capacity (Number) Total capacity of the local primary storage in bytes
  • total_physical_capacity (Number) Total physical capacity of the local primary storage in bytes
  • type (String) Type of the local primary storage
  • url (String) URL of the local primary storage
  • uuid (String) UUID identifier of the local primary storage

On this page