Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs example for templates that use ISO transport #1566

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions website/docs/r/virtual_machine.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ resource "vsphere_virtual_machine" "vm" {
disk {
label = "disk0"
size = data.vsphere_virtual_machine.template.disks.0.size
eagerly_scrub = data.vsphere_virtual_machine.template.disks.0.eagerly_scrub
thin_provisioned = data.vsphere_virtual_machine.template.disks.0.thin_provisioned
}
clone {
Expand Down Expand Up @@ -544,7 +543,6 @@ resource "vsphere_virtual_machine" "vm" {
disk {
name = "disk0"
size = data.vsphere_virtual_machine.template_from_ovf.disks.0.size
eagerly_scrub = data.vsphere_virtual_machine.template_from_ovf.disks.0.eagerly_scrub
thin_provisioned = data.vsphere_virtual_machine.template_from_ovf.disks.0.thin_provisioned
}
clone {
Expand Down Expand Up @@ -1291,7 +1289,30 @@ The options available in the `ovf_deploy` block are:

### Using vApp Properties for OVF/OVA Configuration

You can use the `properties` section of the `vapp` block to supply configuration parameters to a virtual machine cloned from a template that originated from an imported OVF/OVA file. Both GuestInfo and ISO transport methods are supported. For templates that use ISO transport, a CD-ROM backed by a client device must be included. See the section on [CD-ROM options](#cd-rom-options) for more information.
You can use the `properties` section of the `vapp` block to supply configuration parameters to a virtual machine cloned from a template that originated from an imported OVF/OVA file. Both GuestInfo and ISO transport methods are supported.

For templates that use ISO transport, a CD-ROM backed by a client device must be included.

**Example**:

```hcl
resource "vsphere_virtual_machine" "vm" {
# ... other configuration ...
clone {
template_uuid = data.vsphere_virtual_machine.template_from_ovf.id
}
cdrom {
client_device = true
}
vapp {
properties = {
guestinfo.terraform.id = "foo"
}
}
}
```

See the section on [CD-ROM options](#cd-rom-options) for more information.

~> **NOTE:** The only supported usage path for vApp properties is for existing user-configurable keys. These generally come from an existing template created by importing an OVF or OVA file. You cannot set values for vApp properties on virtual machines created from scratch, virtual machines lacking a vApp configuration, or on property keys that do not exist.

Expand Down