-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
236 lines (194 loc) · 6.88 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
#################
# General Options
#################
variable "environment" {
description = "Application environment for which this network is being created. e.g. Development/Production"
type = "string"
default = "Development"
}
variable "custom_tags" {
description = "Optional tags to be applied on top of the base tags on all resources"
type = "map"
default = {}
}
##################
# VPC Core Options
##################
variable "vpc_name" {
description = "Name for the VPC"
type = "string"
}
variable "cidr_range" {
description = "CIDR range for the VPC"
default = "172.18.0.0/16"
type = "string"
}
variable "default_tenancy" {
description = "Default tenancy for instances. Either multi-tenant (default) or single-tenant (dedicated)"
default = "default"
type = "string"
}
variable "domain_name" {
description = "Custom domain name for the VPC"
default = ""
type = "string"
}
variable "domain_name_servers" {
description = "Array of custom domain name servers"
type = "list"
default = ["AmazonProvidedDNS"]
}
variable "enable_dns_hostnames" {
description = "Whether or not to enable DNS hostnames for the VPC"
type = "string"
default = "true"
}
variable "enable_dns_support" {
description = "Whether or not to enable DNS support for the VPC"
type = "string"
default = "true"
}
#####################
# Subnet Core Options
#####################
variable "custom_azs" {
description = "A list of AZs that VPC resources will reside in"
type = "list"
default = []
}
variable "az_count" {
description = "Number of AZs to utilize for the subnets"
type = "string"
default = "2"
}
variable "public_cidr_ranges" {
description = "An array of CIDR ranges to use for public subnets"
type = "list"
default = [
"172.18.168.0/22",
"172.18.172.0/22",
"172.18.176.0/22",
]
}
variable "public_subnets_per_az" {
description = <<EOF
Number of public subnets to create in each AZ. NOTE: This value, when multiplied by the value of `az_count`,
should not exceed the length of the `public_cidr_ranges` list!
EOF
type = "string"
default = "1"
}
variable "public_subnet_names" {
description = <<EOF
Text that will be included in generated name for public subnets. Given the default value of `["Public"]`, subnet
names in the form \"<vpc_name>-Public<count+1>\", e.g. \"MyVpc-Public1\" will be produced. Otherwise, given a
list of names with length the same as the value of `az_count`, the first `az_count` subnets will be named using
the first string in the list, the second `az_count` subnets will be named using the second string, and so on.
EOF
type = "list"
default = ["Public"]
}
variable "public_subnet_tags" {
description = "A list of maps containing tags to be applied to public subnets. List should either be the same length as the number of AZs to apply different tags per set of subnets, or a length of 1 to apply the same tags across all public subnets."
type = "list"
default = [
{},
]
}
variable "private_cidr_ranges" {
description = "An array of CIDR ranges to use for private subnets"
type = "list"
default = [
"172.18.0.0/21",
"172.18.8.0/21",
"172.18.16.0/21",
]
}
variable "private_subnets_per_az" {
description = <<EOF
Number of private subnets to create in each AZ. NOTE: This value, when multiplied by the value of `az_count`,
should not exceed the length of the `private_cidr_ranges` list!
EOF
type = "string"
default = "1"
}
variable "private_subnet_names" {
description = <<EOF
Text that will be included in generated name for private subnets. Given the default value of `["Private"]`, subnet
names in the form \"<vpc_name>-Private<count+1>\", e.g. \"MyVpc-Public2\" will be produced. Otherwise, given a
list of names with length the same as the value of `az_count`, the first `az_count` subnets will be named using
the first string in the list, the second `az_count` subnets will be named using the second string, and so on.
EOF
type = "list"
default = ["Private"]
}
variable "private_subnet_tags" {
description = "A list of maps containing tags to be applied to private subnets. List should either be the same length as the number of AZs to apply different tags per set of subnets, or a length of 1 to apply the same tags across all private subnets."
type = "list"
default = [
{},
]
}
#######################
# Conditional Resources
#######################
variable "build_flow_logs" {
description = "Whether or not to build flow log components in cloud watch logs"
default = "false"
type = "string"
}
variable "build_s3_flow_logs" {
description = "Whether or not to build flow log components in s3"
default = "false"
type = "string"
}
variable "logging_bucket_name" {
description = "Bucket name to store s3 flow logs. If empty, to create random bucket name. In conjuction with build_s3_flow_logs"
type = "string"
default = ""
}
variable "logging_bucket_access_control" {
description = "Define ACL for Bucket from one of the [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl): private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write"
type = "string"
default = "bucket-owner-full-control"
}
variable "logging_bucket_retention" {
description = "The number of days to retain load balancer logs. 0 to ratain forever."
type = "string"
default = "14"
}
variable "logging_bucket_prefix" {
description = "The prefix for the location in the S3 bucket. If you don't specify a prefix, the access logs are stored in the root of the bucket."
type = "string"
default = ""
}
variable "logging_bucket_encryption" {
description = "Enable default bucket encryption. i.e. AES256 | aws:kms"
type = "string"
default = "AES256"
}
variable "logging_bucket_encryption_kms_mster_key" {
description = "The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of sse_algorithm as aws:kms."
type = "string"
default = ""
}
variable "logging_bucket_force_destroy" {
description = "Whether all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. ie. true"
type = "string"
default = "false"
}
variable "build_nat_gateways" {
description = "Whether or not to build a NAT gateway per AZ"
default = "true"
type = "string"
}
variable "build_vpn" {
description = "Whether or not to build a VPN gateway"
default = "false"
type = "string"
}
variable "spoke_vpc" {
description = "Whether or not the VPN gateway is a spoke of a Transit VPC"
default = "false"
type = "string"
}