-
Notifications
You must be signed in to change notification settings - Fork 108
vsphere-iso: Wrong value for HCP metadata vsphere_uuid attribute when exporting to a content library #207
Description
Overview of the Issue
When building an image and exporting it to a content library (OVF or VM template format), the resulting vsphere_uuid label for HCP Packer is the one from the VM (that has been deleted) instead of the content library item.
When using the resulting image from HCP Packer with Terraform, the resource. vsphere_virtual_machine.vm.clone.template_uuid parameter can't be set to data.hcp_packer_image.image.labels.vsphere_uuid . (see Terraform sample below)
Reproduction Steps
- Run packer build with
content_library_destinationandhcp_packer_registryblocks
Packer Version
- v1.8.2
Plugin Version and Builders
-
v1.0.6
-
vsphere-iso -
vsphere-clone
VMware vSphere Version
- 7.0.2
Guest Operating System
- Ubuntu 22.04 LTS x64
Simplified Packer Buildfile
-
Packer build file
https://github.com/sestegra/packer-examples-for-vsphere/blob/hcp/builds/linux/ubuntu/22-04-lts/linux-ubuntu.pkr.hcl#L202 -
Terraform usage
https://github.com/sestegra/packer-examples-for-vsphere/blob/hcp/terraform/vsphere-virtual-machine/content-library-ovf-hcp-packer/main.tf#L67
Operating System and Environment Details
- HCP Packer account
- Operating System: macOS Big Sur (Intel)
Log Fragments and crash.log Files
N/A