-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
42 lines (36 loc) · 1.14 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
module "snapshots" {
source = "./Modules/Snapshots"
student_list = var.student_list
professor_list = var.professor_list
folder = var.folder
vm_ids = module.virtual_machines.vm_ids
data = local.shared_data
depends_on = [module.virtual_machines.vms_complete]
}
module "virtual_machines" {
source = "./Modules/VirtualMachines"
student_list = var.student_list
professor_list = var.professor_list
data = local.shared_data
folder_ids = module.folders.folder_ids
}
module "folders" {
source = "./Modules/Folders"
student_list = var.student_list
professor_list = var.professor_list
folder = var.folder
data = local.shared_data
}
locals {
shared_data = {
resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
datastore_id = data.vsphere_datastore.datastore.id
datacenter_id = data.vsphere_datacenter.datacenter.id
}
}
output "vm_ids" {
value = module.virtual_machines.vm_ids
}
output "folder_ids" {
value = module.folders.folder_ids
}