Skip to content

Instantly share code, notes, and snippets.

View adeturner's full-sized avatar

Adrian Turner adeturner

View GitHub Profile
@adeturner
adeturner / gist:844ec33d4210a1b6741842980fc30efd
Last active February 13, 2024 09:08
vsphere remote_exec example
resource "vsphere_virtual_machine" "runner" {
name = local.hostname
datastore_id = data.vsphere_datastore.datastore.id
resource_pool_id = vsphere_resource_pool.workload_rp.id
folder = vsphere_folder.workload_folder.path
wait_for_guest_net_timeout = 5
firmware = "efi"
network_interface {
resource "vsphere_virtual_machine" "runner" {
# removed
vapp {
# cant set these as its an enhancement still:
# https://github.com/hashicorp/packer-plugin-vsphere/issues/44
properties = {
user-data = base64encode(local.custom_data)
}