-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.tf
31 lines (26 loc) · 875 Bytes
/
data.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
data "vsphere_datacenter" "dc" {
name = var.dc
}
data "vsphere_compute_cluster" "cluster" {
name = var.cluster
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_datastore" "datastore" {
name = var.datastore
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_resource_pool" "pool" {
count = length(local.hosts[*].vm_rp)
name = local.hosts[count.index].vm_rp
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_network" "network" {
count = length(local.hosts[*].net_cards)
name = local.hosts[count.index].net_cards
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_virtual_machine" "template" {
count = length(local.hosts[*].vm_template)
name = local.hosts[count.index].vm_template
datacenter_id = data.vsphere_datacenter.dc.id
}