0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-01 11:02:59 +00:00
terraform-provider-proxmox/docs/resources/virtual_environment_vm2.md
Pavel Boldyrev 7209fe0321
chore(vm2): experimental support for clone and inherited attributes (#1235)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-24 02:00:11 +00:00

3.4 KiB

layout title parent subcategory description
page proxmox_virtual_environment_vm2 Resources Virtual Environment This is an experimental implementation of a Proxmox VM resource using Plugin Framework.It is a Proof of Concept, highly experimental and will change in future. It does not support all features of the Proxmox API for VMs and MUST NOT be used in production.

Resource: proxmox_virtual_environment_vm2

!> DO NOT USE This is an experimental implementation of a Proxmox VM resource using Plugin Framework.

It is a Proof of Concept, highly experimental and will change in future. It does not support all features of the Proxmox API for VMs and MUST NOT be used in production.

-> Note: Many attributes are marked as optional and computed in the schema, hence you may seem added to the plan with "(known after apply)" status, even if they are not set in the configuration. This is done to support the clone operation, when a VM is created from an existing one, and attributes of the original VM are copied to the new one.

Computed attributes allow the provider to set those attributes without user input. The attributes are marked as optional to allow the user to set (or overwrite) them if needed. In order to remove the computed attribute from the plan, you can set it to an empty value (e.g. "" for string, [] for collection).

Schema

Required

  • node_name (String) The name of the node where the VM is provisioned.

Optional

  • clone (Attributes) The cloning configuration. (see below for nested schema)
  • description (String) The description of the VM.
  • id (Number) The unique identifier of the VM in the Proxmox cluster.
  • name (String) The name of the VM. Doesn't have to be unique.
  • tags (Set of String) The tags assigned to the resource.
  • template (Boolean) Set to true to create a VM template.
  • timeouts (Attributes) (see below for nested schema)

Nested Schema for clone

Required:

  • id (Number) The ID of the VM to clone.

Optional:

  • retries (Number) The number of retries to perform when cloning the VM (default: 3).

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • read (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).