-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
41 lines (37 loc) · 1.23 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
provider "esxi" {
esxi_hostname = var.esxi_hostname
esxi_hostport = var.esxi_hostport
esxi_hostssl = var.esxi_hostssl
esxi_username = var.esxi_username
esxi_password = var.esxi_password
}
resource "esxi_guest" "small" {
count = "${length(var.small)}"
guest_name = "${var.small[count.index]}"
disk_store = var.disk_store
resource_pool_name = var.resource_pool_name
memsize = "${var.specs.small-mem}"
numvcpus = "${var.specs.small-cpu}"
power = "on"
clone_from_vm = var.clone_from_vm
guest_startup_timeout = var.guest_startup_timeout
guest_shutdown_timeout = var.guest_shutdown_timeout
network_interfaces {
virtual_network = var.virtual_network
}
}
resource "esxi_guest" "medium" {
count = "${length(var.medium)}"
guest_name = "${var.medium[count.index]}"
disk_store = var.disk_store
resource_pool_name = var.resource_pool_name
memsize = "${var.specs.medium-mem}"
numvcpus = "${var.specs.medium-cpu}"
power = "on"
clone_from_vm = var.clone_from_vm
guest_startup_timeout = var.guest_startup_timeout
guest_shutdown_timeout = var.guest_shutdown_timeout
network_interfaces {
virtual_network = var.virtual_network
}
}