-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.tf
65 lines (54 loc) · 1.98 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
data "vsphere_datacenter" "datacenter" {
name = var.vsphere_datacenter
}
data "vsphere_datastore" "datastore" {
name = var.sap_hana_database_datastore
datacenter_id = data.vsphere_datacenter.datacenter.id
}
data "vsphere_datastore" "custom_datastore_disks" {
for_each = toset(compact(local.disks_per_vm))
name = each.value
datacenter_id = data.vsphere_datacenter.datacenter.id
}
data "vsphere_datastore" "default_datastore_disks" {
for_each = { for k in local.sap_hana_database_default_disks : k.label => k.datastore_name }
name = each.value
datacenter_id = data.vsphere_datacenter.datacenter.id
}
data "vsphere_storage_policy" "custom_datastore_disks" {
for_each = toset(compact(local.storage_policy_per_disks))
name = each.value
}
data "vsphere_storage_policy" "default_datastore_disks" {
for_each = { for k in local.sap_hana_database_default_disks : k.label => k.datastore_policy if k.datastore_policy != "" }
name = each.value
}
data "vsphere_datastore" "iso_datastore" {
for_each = toset(compact(local.iso_datastore_per_vm))
name = each.value
datacenter_id = data.vsphere_datacenter.datacenter.id
}
data "vsphere_compute_cluster" "cluster" {
name = var.vsphere_compute_cluster
datacenter_id = data.vsphere_datacenter.datacenter.id
}
data "vsphere_network" "network" {
for_each = toset(compact(local.network_cards_per_vm))
name = each.value
datacenter_id = data.vsphere_datacenter.datacenter.id
}
data "vsphere_host" "host" {
for_each = toset(compact(local.hosts_distribution_per_vm))
name = each.value
datacenter_id = data.vsphere_datacenter.datacenter.id
}
data "vsphere_content_library" "library" {
for_each = local.content_library_per_vm
name = each.value
}
data "vsphere_content_library_item" "item" {
for_each = local.template_per_vm
name = each.value
type = "ova"
library_id = data.vsphere_content_library.library[each.key].id
}