| page_title | cozystack_vmdisk Resource - cozystack |
|---|---|
| subcategory | |
| description | A Cozystack VM disk, deployed inside a tenant namespace. The interactive upload source is not managed. |
A Cozystack VM disk, deployed inside a tenant namespace. The interactive upload source is not managed.
resource "cozystack_vmdisk" "ubuntu" {
name = "ubuntu"
namespace = "tenant-root"
storage = "20Gi"
source = {
http = { url = "https://example.com/images/ubuntu-22.04.img" }
}
}name(String) VMDisk instance name (metadata.name). Immutable.namespace(String) Tenant namespace the application is created in. Immutable.source(Attributes) Source image used to create the disk. Set exactly one ofdisk,http, orimage. (see below for nested schema)
optical(Boolean) Whether the disk should be considered optical.storage(String) Disk size allocated for the virtual machine (quantity, e.g.5Gi).storage_class(String) StorageClass used to store the data. Changing a value set here replaces the object, because an existing volume is never migrated to another class. Removing the attribute from the configuration does not: the object keeps its volumes and the recorded class reverts to the default.wait_for_ready(Boolean) Block on create/update until theReadycondition is true and any server-generated outputs the resource exposes are readable.wait_timeout(String) Maximum time to wait whenwait_for_readyis set (Go duration, e.g.10m). Readiness and outputs share this budget; outputs that never appear leave a warning and their attributes stay null until the next refresh.
chart_version(String) Deployed chart version (status.version).id(String) Synthetic identifier in the formnamespace/name.ready(Boolean) Whether the application'sReadycondition is true.uid(String) Server-assigned object UID (metadata.uid). Stable across updates; changes on recreate.
Optional:
disk(Attributes) Clone an existing vm-disk. (see below for nested schema)http(Attributes) Download an image from an HTTP source. (see below for nested schema)image(Attributes) Use an image by name from the default collection. (see below for nested schema)
Required:
name(String) Name of the vm-disk to clone.
Required:
url(String) URL to download the image.
Required:
name(String) Name of the image to use.
Import is supported using the following syntax:
The terraform import command can be used, for example:
# VMDisk instances are imported as "<namespace>/<name>".
terraform import cozystack_vmdisk.ubuntu tenant-root/ubuntu