forked from Thavamanirajasakthivel/terraform_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
85 lines (79 loc) · 3.13 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright 2020 Hewlett Packard Enterprise Development LP
module "database" {
source = "./modules/database_tier"
datacenter = "${var.datacenter}"
datastore = "${var.datastore}"
resource_pool = "${var.resource_pool}"
vm_cluster_name = "${var.vm_cluster_name}"
network = "${var.network}"
template = "${var.template}"
vsphere_server = "${var.vsphere_server}"
vsphere_user = "${var.vsphere_user}"
vsphere_password = "${var.vsphere_password}"
disk_name = "${var.disk_name}"
#disk_size = "${var.disk_size}"
#cpu = "${var.cpu}"
#memory = "${var.memory}"
dhcp = "${var.dhcp}"
db_ip_address = "${var.db_ip_address}"
netmask = "${var.netmask}"
gateway = "${var.gateway}"
nameservers = "${var.nameservers}"
db_hostname = "${var.db_hostname}"
#proxy = "${var.proxy}"
}
module "app" {
source = "./modules/api_tier"
db_ip_address = "${var.db_ip_address}"
#db_instance_id = "${module.database.db_instance_id}"
web_ip_address = "${var.web_ip_address}"
datacenter = "${var.datacenter}"
datastore = "${var.datastore}"
resource_pool = "${var.resource_pool}"
vm_cluster_name = "${var.vm_cluster_name}"
network = "${var.network}"
template = "${var.template}"
vsphere_server = "${var.vsphere_server}"
vsphere_user = "${var.vsphere_user}"
vsphere_password = "${var.vsphere_password}"
disk_name = "${var.disk_name}"
#disk_size = "${var.disk_size}"
#cpu = "${var.cpu}"
#memory = "${var.memory}"
dhcp = "${var.dhcp}"
app_ip_address = "${var.app_ip_address}"
netmask = "${var.netmask}"
gateway = "${var.gateway}"
nameservers = "${var.nameservers}"
app_hostname = "${var.app_hostname}"
template_username = "${var.template_username}"
template_password = "${var.template_password}"
#proxy = "${var.proxy}"
}
module "web" {
source = "./modules/web_tier"
app_ip_address = "${var.app_ip_address}"
#app_instance_id = "${module.app.app_instance_id}"
datacenter = "${var.datacenter}"
datastore = "${var.datastore}"
resource_pool = "${var.resource_pool}"
vm_cluster_name = "${var.vm_cluster_name}"
network = "${var.network}"
template = "${var.template}"
vsphere_server = "${var.vsphere_server}"
vsphere_user = "${var.vsphere_user}"
vsphere_password = "${var.vsphere_password}"
disk_name = "${var.disk_name}"
#disk_size = "${var.disk_size}"
#cpu = "${var.cpu}"
#memory = "${var.memory}"
dhcp = "${var.dhcp}"
web_ip_address = "${var.web_ip_address}"
netmask = "${var.netmask}"
gateway = "${var.gateway}"
nameservers = "${var.nameservers}"
web_hostname = "${var.web_hostname}"
template_username = "${var.template_username}"
template_password = "${var.template_password}"
#proxy = "${var.proxy}"
}