zsphere_vm_template
This resource allows you to create and manage VM templates in ZSvirt. A VM template is created by converting an existing VM instance.
zsphere_vm_template (Resource)
This resource allows you to create and manage VM templates in ZSvirt. A VM template is created by converting an existing VM instance.
Example Usage
resource "zsphere_vm_template" "example" {
name = "my-updated-template"
description = "This template was managed by Terraform"
vm_instance_uuid = var.vm_instance_uuid
}
output "vm_template" {
value = zsphere_vm_template.example
}
# Note: Creating a VM Template is done by converting an existing VM instance.
# This resource is used to manage existing VM templates (read, update, delete).
# The creation of VM templates needs to be done through:
# 1. Converting an existing VM instance using ZStack UI
# 2. Using API: POST /vm-instances/{uuid}/create-templated-vmInstance
# 3. Or using zsphere_instance resource with convert_to_template = trueSchema
Required
name(String) The name of the VM template.
Optional
description(String) The description of the VM template.vm_instance_uuid(String) The UUID of the VM instance to convert to a template. Changing this will recreate the resource.
Read-Only
cluster_uuid(String) The UUID of the cluster to which the VM template belongs.uuid(String) The unique identifier of the VM template. Automatically generated by ZSvirt.
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.
zsphere_instance
This resource allows you to manage virtual machine (VM) instances in ZStack. A VM instance represents a virtualized compute resource that can be created, updated, and deleted. You can define the VM's properties, such as its name, image, network configuration, disks, and GPU devices.