Resources
zsphere_image_storage
Image Storage resource for managing backup storages.
zsphere_image_storage (Resource)
Image Storage resource for managing backup storages.
Example Usage
data "zsphere_datacenter" "test" {
name = "zone_example"
}
resource "zsphere_image_storage" "image_store" {
name = "image_store_from_terraform"
description = "Add An example image storage from terraform"
type = "ImageStore"
hostname = "192.168.1.100"
url = "/zstack/imagestore"
ssh_port = 22
username = "root"
password = "password"
zone_uuid = data.zsphere_datacenter.test.data_centers[0].uuid
import_images = false
}
resource "zsphere_image_storage" "ceph" {
name = "ceph_backup_storage_from_terraform"
description = "Add An example Ceph backup storage from terraform"
type = "Ceph"
pool_name = "images"
mon_urls = ["ceph-user:password@192.168.1.10:6789"]
zone_uuid = data.zsphere_zone.test.zones[0].uuid
}
output "zsphere_image_storage_image_store" {
value = zsphere_image_storage.image_store
}
output "zsphere_image_storage_ceph" {
value = zsphere_image_storage.ceph
}Schema
Required
name(String) Name of the Image Storagetype(String) Type of the Image Storage (ImageStore or Ceph)
Optional
description(String) Description of the Image Storagehostname(String) Hostname for ImageStore typeimport_images(Boolean) Import images for ImageStore typemon_urls(List of String) MON URLs for Ceph typepassword(String, Sensitive) Password for ImageStore typepool_name(String) Pool name for Ceph typessh_port(Number) SSH port for ImageStore typeurl(String) URL for ImageStore typeusername(String) Username for ImageStore typezone_uuid(String) Zone UUID to attach the Image Storage
Read-Only
attached_zone_uuids(List of String) Attached zone UUIDsavailable_capacity(Number) Available capacity of the Image Storagestate(String) State of the Image Storagestatus(String) Status of the Image Storagetotal_capacity(Number) Total capacity of the Image Storageuuid(String) UUID of the Image Storage
zsphere_nfs_primary_storage
NFS Primary Storage Resource
zsphere_image
This resource allows you to manage images in ZSvirt. An image represents a virtual machine image format qcow2, raw, vmdk or an ISO file that can be used to create or boot virtual machines. You can define the image's properties, such as its URL, format, architecture, and backup storage locations.