-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebservers-vars.tf
95 lines (79 loc) · 2.27 KB
/
webservers-vars.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
## ## specific to web servers
# if you want this to talk and run the setup scripts then you gotta give
# some pathing so that execution can hweben
variable "web_public_key_path" {
description = "public key"
default = "~/.ssh/ansible.pub"
}
variable "web_private_key_path" {
description = "private key"
default = "~/.ssh/ansible"
}
# and which script do we push up? It can do anything!
variable "web_provision_src_path" {
description = "script source to feed the monsters"
default = "scripts/web_install.sh"
}
variable "web_provision_dest_path" {
description = "script destination to feed the monsters"
default = "/tmp/install.sh"
}
# let's configure the vCPU and RAM allocations
variable "web_vcpu" {
description = "how many vCPUs do we want?"
default = "2"
}
variable "web_mem" {
description = "how much RAM do we want?"
default = "2048"
}
# this is a little tricky - we need to have <x> number of webservers
# running but we need to have allocated IPs to match up and we can not
# do this programmatically
#
# this is important - if you are changing the number of servers then you
# *must* also make sure you have enough IPs to support such
variable "web_how_many" {
default = "4"
}
# create map of the final octet for networking
variable "web_last_octets" {
default = {
"0" = "100"
"1" = "101"
"2" = "102"
"3" = "103"
"4" = "104"
"5" = "105"
}
}
variable "web_ext_network_switch" {
description = "which standard or vDS switch will the VM live?"
default = "external_network"
}
variable "web_ext_ip_network" {
description = "first three octets of network"
default = "172.16.245"
}
variable "web_ext_ip_cidr" {
description = "cidr bit-length"
default = "24"
}
variable "web_ext_ip_gateway" {
description = "default IPv4 gateway"
default = "172.16.245.254"
}
# commented out in webservers.tf - do you have a reason for
# multiple networks? If so, then have at it!
variable "web_int_network_switch" {
description = "which standard or vDS switch will the VM live?"
default = "web_internal_network"
}
variable "web_int_ip_network" {
description = "first three octets of network"
default = "172.18.245"
}
variable "web_int_ip_cidr" {
description = "cidr bit-length"
default = "24"
}