diff --git a/content/docs/getting-started/create-small-vm-catalog-item.md b/content/docs/getting-started/create-small-vm-catalog-item.md index eb061fc..65a50c8 100644 --- a/content/docs/getting-started/create-small-vm-catalog-item.md +++ b/content/docs/getting-started/create-small-vm-catalog-item.md @@ -23,42 +23,46 @@ Create a file called `small-vm.yaml` with the following content: api_version: v1alpha1 display_name: "Small VM" spec: - service_type: vm - fields: - - path: metadata - editable: true - - path: vcpu.count - display_name: "CPU Count" - editable: true - default: 2 - validation_schema: - type: integer - minimum: 1 - maximum: 4 - - path: memory.size - display_name: "Memory (GB)" - editable: false - default: "2GB" - - path: storage.disks - display_name: "Storage (GB)" - editable: false - default: - - name: boot - capacity: "20GB" - validation_schema: - type: array - - path: guest_os.type - display_name: "Guest OS" - editable: true - default: "rhel-10" - validation_schema: - type: string - enum: - - rhel-9 - - rhel-10 + resources: + - name: main + service_type: vm + fields: + - path: metadata + editable: true + - path: vcpu.count + display_name: "CPU Count" + editable: true + default: 2 + validation_schema: + type: integer + minimum: 1 + maximum: 4 + - path: memory.size + display_name: "Memory (GB)" + editable: false + default: "2GB" + - path: storage.disks + display_name: "Storage (GB)" + editable: false + default: + - name: boot + capacity: "20GB" + validation_schema: + type: array + - path: guest_os.type + display_name: "Guest OS" + editable: true + default: "rhel-10" + validation_schema: + type: string + enum: + - rhel-9 + - rhel-10 ``` -This defines a small VM catalog item with: +A catalog item declares one or more **resources** — each with a name, service +type, and field configurations. This single-resource catalog item defines a VM +(`main`) with: - **Metadata** — editable by users, for setting VM name and labels - **2 vCPUs** — editable by users, between 1 and 4 diff --git a/content/docs/getting-started/create-small-vm-instance.md b/content/docs/getting-started/create-small-vm-instance.md index bd2de82..4fd2b71 100644 --- a/content/docs/getting-started/create-small-vm-instance.md +++ b/content/docs/getting-started/create-small-vm-instance.md @@ -26,15 +26,21 @@ display_name: "My Dev VM" spec: catalog_item_id: small-vm user_values: - - path: metadata + - resource: main + path: metadata value: name: "small-vm" labels: env: "dev" - - path: vcpu.count + - resource: main + path: vcpu.count value: 1 ``` +Each `user_values` entry specifies which **resource** (by name) it applies to. +For single-resource catalog items like `small-vm`, this is the name of the sole +resource (`main`). + This creates a VM instance based on the `small-vm` catalog item with: - **Metadata** — sets the VM name to `small-vm` with a `dev` environment label