-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
34 lines (29 loc) · 897 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
30
31
32
33
34
terraform {
backend "s3" {}
}
provider "vsphere" {
vsphere_server = var.vsphere_server
user = var.vsphere_user
password = var.vsphere_password
allow_unverified_ssl = true
}
module "virtual-machine" {
for_each = var.virtual_machines
source = "./modules/virtual-machine"
providers = {
vsphere = vsphere
}
cluster = each.value.cluster
datacenter = each.value.datacenter
datastore = each.value.datastore
dns_server_list = each.value.dns_server_list
folder = each.value.folder
ipv4_with_cidr = each.value.ipv4_with_cidr
linked_clone = each.value.linked_clone
memory = each.value.memory
name = each.value.name
network = each.value.network
num_cpus = each.value.num_cpus
template = each.value.template
time_zone = each.value.time_zone
}