forked from jonghall/ibmcloud-terraform-vpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
165 lines (131 loc) · 3.81 KB
/
variables.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#---------------------------------------------------------
# MODIFY VARIABLES AS NEEDED
#---------------------------------------------------------
#---------------------------------------------------------
#---------------------------------------------------------
## DEFINE VPC
#---------------------------------------------------------
variable "vpc-name" {
default = "vpc-name-here"
}
variable "resource_group" {
default = "resource-name-here"
}
variable "cis_resource_group" {
default = "cis-resource-name-here"
}
#---------------------------------------------------------
## DEFINE Zones
#---------------------------------------------------------
variable "zone1" {
default = "us-south-1"
}
variable "zone2" {
default = "us-south-2"
}
#---------------------------------------------------------
## DEFINE CIDR Blocks to be used in each zone
#---------------------------------------------------------
variable "address-prefix-vpc" {
default = "172.21.0.0/20"
}
variable "address-prefix-1" {
default = "172.21.0.0/21"
}
variable "address-prefix-2" {
default = "172.21.8.0/21"
}
#---------------------------------------------------------
## DEFINE subnets for zone 1
#---------------------------------------------------------
variable "webapptier-subnet-zone-1" {
default = "172.21.0.0/24"
}
variable "dbtier-subnet-zone-1" {
default = "172.21.1.0/24"
}
variable "vpn-subnet-zone-1" {
default = "172.21.2.0/24"
}
#---------------------------------------------------------
## DEFINE subnets for zone 2
#---------------------------------------------------------
variable "webapptier-subnet-zone-2" {
default = "172.21.8.0/24"
}
variable "dbtier-subnet-zone-2" {
default = "172.21.9.0/24"
}
variable "vpn-subnet-zone-2" {
default = "172.21.10.0/24"
}
#---------------------------------------------------------
## DEFINE DNS
#---------------------------------------------------------
variable "domain" {
default = "mydomain.com"
}
variable "cis_instance_name" {
default = "mydomain.com"
}
variable "dns_name" {
default = "www."
}
#---------------------------------------------------------
## DEFINE sshkey to be used for compute instances
#---------------------------------------------------------
variable "ssh_public_key" {
default = "~/.ssh/id_rsa.pub"
}
#---------------------------------------------------------
## DEFINE OS image to be used for compute instances
#---------------------------------------------------------
#image = Ubuntu-18.04-amd64
variable "image" {
default = "r006-ed3f775f-ad7e-4e37-ae62-7199b4988b00"
}
#---------------------------------------------------------
## DEFINE webapptier compute instance profile & quantity
#---------------------------------------------------------
variable "profile-webappserver" {
default = "cx2-2x4"
}
variable "webappserver-name" {
default = "webapp%02d"
}
variable "webappserver-count" {
default = 1
}
#---------------------------------------------------------
## DEFINE database tier compute instance profile & quantity
#---------------------------------------------------------
variable "profile-dbserver" {
default = "bx2-4x16"
}
variable "dbserver-name" {
default = "mysql%02d"
}
variable "dbserver-count" {
default = 1
}
#---------------------------------------------------------
## DEFINE Load Balancer for webapptier
#---------------------------------------------------------
variable "webapptier-lb-connections" {
default = 2000
}
variable "webapptier-lb-algorithm" {
default = "round_robin"
}
#---------------------------------------------------------
## DEFINE VPNaaS instance for connectivity to premise
#---------------------------------------------------------
variable "onprem_vpn_ip_address" {
default = "0.0.0.0"
}
variable "onprem_cidr" {
default = "192.168.248.0/24"
}
variable "vpn-preshared-key" {
default = "pre$haredkey"
}