Data Sources
zsphere_images
Fetches a list of images and their associated attributes from the ZSvirt environment.
zsphere_images (Data Source)
Fetches a list of images and their associated attributes from the ZSvirt environment.
Example Usage
data "zsphere_images" "test" {
}
output "zstack_secs" {
value = data.zsphere_images.test
}
# example output:
# zstack_secs = {
# "filter" = tolist([])
# "images" = tolist([
# {
# "architecture" = "x86_64"
# "format" = "qcow2"
# "name" = "Image-1"
# "platform" = ""
# "state" = "Enabled"
# "status" = "Ready"
# "uuid" = "8c00337d47e94acab448e88afdc5c872"
# },
# ])
# "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 imagesname_pattern(String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
Read-Only
images(Attributes List) List of Images (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 images
Read-Only:
architecture(String) CPU architecture of the image, such as x86_64, aarch64, mips64, or longarch64format(String) Format of the image, such as qcow2, iso, vmdk, or rawname(String) Name of the imageplatform(String) Platform of the image, such as Linux, Windows, or Otherstate(String) State of the image, indicating if it is Enabled or Disabledstatus(String) Readiness status of the image (e.g., Ready or Not Ready)uuid(String) UUID identifier of the image