-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_sources.tf
36 lines (30 loc) · 938 Bytes
/
data_sources.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
30
31
32
33
34
35
36
# Data sources
data "vsphere_datacenter" "dc" {
name = var.vsphere_datacenter
}
data "vsphere_host" "hosts" {
name = var.vsphere_host
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_compute_cluster" "compute_cluster" {
name = var.vsphere_compute_cluster
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_datastore" "datastore" {
name = var.vsphere_datastore
datacenter_id = data.vsphere_datacenter.dc.id
}
# Separate data sources for each network
data "vsphere_network" "vm_network" {
name = "VM Network"
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_network" "vlan_trunk" {
name = "VLAN TRUNK"
datacenter_id = data.vsphere_datacenter.dc.id
}
# Template
data "vsphere_virtual_machine" "template" {
name = var.vm_template_name
datacenter_id = data.vsphere_datacenter.dc.id
}