Skip to content

Instantly share code, notes, and snippets.

@akulbe
Created Jun 18, 2017
Embed
What would you like to do?
# Configure the VMware vSphere Provider
provider "vsphere" {
user = "${var.vsphere_user}"
password = "${var.vsphere_password}"
vsphere_server = "${var.vsphere_server}"
allow_unverified_ssl = "true"
}
# Create a folder
resource "vsphere_folder" "frontend" {
path = "TerraformMachines"
datacenter = "LVB"
}
resource "vsphere_virtual_machine" "TerraTwo" {
name = "TerraTwo"
vcpu = 1
memory = 1024
datacenter = "LVB"
#resource_pool = "x.y.z.w"
folder = "${vsphere_folder.frontend.path}"
network_interface {
label = "VM Network"
}
disk {
datastore = "datastore1"
#vmdk = "/test2/test2"
template = "Xenial_Template"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment