Skip to content

Latest commit

 

History

History
92 lines (62 loc) · 3.29 KB

vmdisk.md

File metadata and controls

92 lines (62 loc) · 3.29 KB
page_title cozystack_vmdisk Resource - cozystack
subcategory
description A Cozystack VM disk, deployed inside a tenant namespace. The interactive upload source is not managed.

cozystack_vmdisk (Resource)

A Cozystack VM disk, deployed inside a tenant namespace. The interactive upload source is not managed.

Example Usage

resource "cozystack_vmdisk" "ubuntu" {
  name      = "ubuntu"
  namespace = "tenant-root"
  storage   = "20Gi"

  source = {
    http = { url = "https://example.com/images/ubuntu-22.04.img" }
  }
}

Schema

Required

  • 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 of disk, http, or image. (see below for nested schema)

Optional

  • 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 the Ready condition is true and any server-generated outputs the resource exposes are readable.
  • wait_timeout (String) Maximum time to wait when wait_for_ready is 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.

Read-Only

  • chart_version (String) Deployed chart version (status.version).
  • id (String) Synthetic identifier in the form namespace/name.
  • ready (Boolean) Whether the application's Ready condition is true.
  • uid (String) Server-assigned object UID (metadata.uid). Stable across updates; changes on recreate.

Nested Schema for source

Optional:

Nested Schema for source.disk

Required:

  • name (String) Name of the vm-disk to clone.

Nested Schema for source.http

Required:

  • url (String) URL to download the image.

Nested Schema for source.image

Required:

  • name (String) Name of the image to use.

Import

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