-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathvariables.tf
More file actions
234 lines (193 loc) · 7.26 KB
/
variables.tf
File metadata and controls
234 lines (193 loc) · 7.26 KB
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
variable "az_count" {
description = "Number of AZs to utilize for the subnets"
type = number
default = 2
}
variable "build_flow_logs" {
description = "Whether or not to build flow log components in Cloudwatch Logs"
default = false
type = bool
}
variable "build_igw" {
description = "Whether or not to build an internet gateway. If disabled, no public subnets or route tables, internet gateway, or NAT Gateways will be created."
type = bool
default = true
}
variable "build_nat_gateways" {
description = "Whether or not to build a NAT gateway per AZ. if `build_igw` is set to false, this value is ignored."
type = bool
default = true
}
variable "build_s3_flow_logs" {
description = "Whether or not to build flow log components in s3"
type = bool
default = false
}
variable "build_vpn" {
description = "Whether or not to build a VPN gateway"
type = bool
default = false
}
variable "cidr_range" {
description = "CIDR range for the VPC"
type = string
default = "172.18.0.0/19"
}
variable "cloudwatch_flowlog_retention" {
description = "The number of days to retain flowlogs in CLoudwatch Logs. Valid values are: [0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653]. A value of `0` will retain indefinitely."
type = number
default = 14
}
variable "custom_azs" {
description = "A list of AZs that VPC resources will reside in"
type = list(string)
default = []
}
variable "default_tenancy" {
description = "Default tenancy for instances. Either multi-tenant (default) or single-tenant (dedicated)"
type = string
default = "default"
}
variable "domain_name" {
description = "Custom domain name for the VPC"
type = string
default = ""
}
variable "domain_name_servers" {
description = "Array of custom domain name servers"
type = list(string)
default = ["AmazonProvidedDNS"]
}
variable "enable_dns_hostnames" {
description = "Whether or not to enable DNS hostnames for the VPC"
type = bool
default = true
}
variable "enable_dns_support" {
description = "Whether or not to enable DNS support for the VPC"
type = bool
default = true
}
variable "environment" {
description = "Application environment for which this network is being created. e.g. Development/Production"
type = string
default = "Development"
}
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, log-delivery-write"
type = string
default = "private"
}
variable "logging_bucket_encryption" {
description = "Enable default bucket encryption. i.e. AES256 or 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 = bool
default = false
}
variable "logging_bucket_name" {
description = "Bucket name to store s3 flow logs. If empty, a random bucket name is generated. Use in conjuction with `build_s3_flow_logs`"
type = string
default = ""
}
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 "name" {
description = "Name prefix for the VPC and related resources"
type = string
}
variable "private_cidr_ranges" {
description = "An array of CIDR ranges to use for private subnets"
type = list(string)
default = [
"172.18.16.0/22",
"172.18.20.0/22",
"172.18.24.0/22",
]
}
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(string)
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(map(string))
default = [{}]
}
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 = number
default = 1
}
variable "public_cidr_ranges" {
description = "An array of CIDR ranges to use for public subnets"
type = list(string)
default = [
"172.18.0.0/22",
"172.18.4.0/22",
"172.18.8.0/22",
]
}
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(string)
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(map(string))
default = [{}]
}
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 = number
default = 1
}
variable "s3_flowlog_retention" {
description = "The number of days to retain flowlogs in s3. A value of `0` will retain indefinitely."
type = number
default = 14
}
variable "single_nat" {
description = "Deploy VPC in single NAT mode."
type = bool
default = false
}
variable "spoke_vpc" {
description = "Whether or not the VPN gateway is a spoke of a Transit VPC"
type = bool
default = false
}
variable "tags" {
description = "Optional tags to be applied on top of the base tags on all resources"
type = map(string)
default = {}
}