This repository was archived by the owner on Jul 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvariables.tf
More file actions
313 lines (273 loc) · 8.86 KB
/
Copy pathvariables.tf
File metadata and controls
313 lines (273 loc) · 8.86 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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
variable "availability_zones" {
type = list(string)
description = "A list of availability zones for the subnets"
}
variable "cidr_block" {
type = string
default = null
description = "The CIDR block for the VPC"
}
variable "codebuild_interface_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision a CodeBuild endpoint to the VPC"
}
variable "dhcp_options" {
type = object({
domain_name = string
domain_name_servers = list(string)
netbios_name_servers = list(string)
netbios_node_type = number
ntp_servers = list(string)
})
default = null
description = "DHCP options to assign to the VPC"
}
variable "ebs_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an EBS endpoint to the VPC"
}
variable "ec2_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an EC2 endpoint to the VPC"
}
variable "ec2messages_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an EC2 messages endpoint to the VPC"
}
variable "ecr_api_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an ECR endpoint to the VPC"
}
variable "enable_nat_gateway" {
type = bool
default = true
description = "Set to true to provision a NAT Gateway for each private subnet"
}
variable "enable_private_default_route" {
type = bool
default = true
description = "Set to true to add a default route to the NAT gateway for each private subnet"
}
variable "flow_logs_s3" {
type = object({
bucket_name = optional(string)
kms_key_arn = optional(string)
log_destination = optional(string)
log_format = optional(string)
max_aggregation_interval = optional(number, 60)
retention_in_days = optional(number, 90)
traffic_type = optional(string, "ALL")
destination_options = optional(object({
file_format = optional(string)
hive_compatible_partitions = optional(bool)
per_hour_partition = optional(bool, true)
}), {})
})
default = null
description = "Variables to enable flow logs stored in S3 for the VPC. Use 'bucket_name' to log to an S3 bucket created by this module. Alternatively, use 'log_destination' to specify a self-managed S3 bucket. The 'log_destination' variable accepts full S3 ARNs, optionally including object keys."
validation {
condition = var.flow_logs_s3 == null || (try(var.flow_logs_s3.log_destination, null) != null || try(var.flow_logs_s3.bucket_name, null) != null)
error_message = "Either log_destination or bucket_name must be specified in flow_logs_s3 if the configuration is provided."
}
}
variable "flow_logs_cloudwatch" {
type = object({
iam_role_name = optional(string, "VpcFlowLogs")
iam_role_name_prefix = optional(string)
iam_role_postfix = optional(bool, true)
iam_role_path = optional(string, "/")
iam_role_permission_boundary = optional(string)
kms_key_arn = optional(string)
log_format = optional(string)
log_group_name = optional(string)
max_aggregation_interval = optional(number, 60)
retention_in_days = optional(number, 90)
traffic_type = optional(string, "ALL")
})
default = null
description = "Variables to enable flow logs for the VPC"
validation {
condition = var.flow_logs_cloudwatch == null || !(try(var.flow_logs_cloudwatch.iam_name, null) != null && try(var.flow_logs_cloudwatch.iam_name_prefix, null) != null)
error_message = "Only one of iam_name or iam_name_prefix can be defined."
}
}
variable "internet_gateway_tags" {
type = map(string)
default = {}
description = "Additional tags to set on the internet gateway"
}
variable "ipv4_ipam" {
type = object({
pool_id = string
netmask_length = number
})
default = null
description = "The IPv4 IPAM configuration to use for the VPC"
}
variable "lambda_subnet_bits" {
type = number
default = null
description = "The number of bits used for the subnet mask"
}
variable "logs_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision a log endpoint to the VPC"
}
variable "map_public_ip_on_launch" {
type = bool
default = false
description = "Whether public IP addresses are assigned on instance launch"
}
variable "mgn_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an MGN endpoint to the VPC"
}
variable "name" {
type = string
description = "Used as part of the resource names to indicate they are created and used within a specific name"
}
variable "private_subnet_bits" {
type = number
default = null
description = "The number of bits used for the subnet mask"
}
variable "private_subnet_tags" {
type = map(string)
default = {}
description = "Additional tags to set on the private subnets"
}
variable "public_subnet_bits" {
type = number
default = null
description = "The number of bits used for the subnet mask"
}
variable "public_subnet_tags" {
type = map(string)
default = {}
description = "Additional tags to set on the public subnets"
}
variable "private_dynamodb_endpoint" {
type = bool
default = false
description = "Deploy a DynamoDB endpoint for your private subnets"
}
variable "private_s3_endpoint" {
type = bool
default = false
description = "Deploy an S3 endpoint for your private subnets"
}
variable "region" {
type = string
default = null
description = "The AWS region where resources will be created; if omitted the default provider region is used"
}
variable "restrict_default_security_group" {
type = bool
default = true
description = "Set to true to remove all rules from the default security group"
}
variable "s3_interface_endpoint" {
type = object({
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an S3 interface endpoint to the VPC"
}
variable "s3_route_table_ids" {
type = list(string)
default = null
description = "Custom route table IDs for the S3 endpoint"
}
variable "share_private_subnets" {
type = bool
default = false
description = "If set it will share the private subnets through resource access manager"
}
variable "share_public_subnets" {
type = bool
default = false
description = "If set it will share the public subnets through resource access manager"
}
variable "shared_public_route_table" {
type = bool
default = true
description = "Determines weather to use a single route table for all public networks"
}
variable "ssm_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an SSM endpoint to the VPC"
}
variable "ssmmessages_endpoint" {
type = object({
private_dns_enabled = bool
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
description = "Variables to provision an SSM messages endpoint to the VPC"
}
variable "subnet_sharing_custom_tags" {
type = map(string)
default = {}
description = "Custom tags to be added to a resource share for subnets"
}
variable "tags" {
type = map(string)
default = {}
description = "A mapping of tags to assign to all resources"
}
variable "transfer_server" {
type = object({
security_group_ids = list(string)
subnet_ids = list(string)
private_dns_enabled = bool
})
default = null
description = "Variables to provision a Transfer Server endpoint to the VPC"
}
variable "vpc_tags" {
type = map(string)
default = {}
description = "Additional tags to set on the VPC"
}