Skip to content

Instantly share code, notes, and snippets.

@adeturner
Created February 13, 2024 09:12
Show Gist options
  • Save adeturner/2e57dd7d52793d2fc79d7481b8d24013 to your computer and use it in GitHub Desktop.
Save adeturner/2e57dd7d52793d2fc79d7481b8d24013 to your computer and use it in GitHub Desktop.
vsphere vapp request
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)
}
}
}
custom_data = <<CUSTOM_DATA
#cloud-config
groups:
- github
users:
- name: github
groups: [github]
runcmd:
- |
# custom commands go here
CUSTOM_DATA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment