-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.tf
30 lines (24 loc) · 873 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Configure the VMware vSphere Provider
provider "vsphere" {
user = "${var.vsphere_user}"
password = "${var.vsphere_password}"
vsphere_server = "${var.vsphere_server}"
# if you have a self-signed cert
allow_unverified_ssl = true
}
# Data resources will discover information about the vSphere environment to be used in other Resources.
data "vsphere_datacenter" "dc" {
name = "${var.datacenter}"
}
data "vsphere_resource_pool" "pool" {
name = "${var.vsphere_resource_pool}/Resources"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
}
data "vsphere_network" "network" {
name = "${var.vsphere_network_name}"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
}
data "vsphere_virtual_machine" "proxy_template" {
name = "${var.proxy_template_path}"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
}