-
Notifications
You must be signed in to change notification settings - Fork 16
/
variables.tf
148 lines (135 loc) · 5.29 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
variable "amazon_side_asn" {
description = "Private Autonomous System Number (ASN) for the Amazon side of a BGP session (range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASN)"
type = number
default = 64512
}
variable "auto_accept_shared_attachments" {
description = "Whether resource attachment requests are automatically accepted (valid values: disable, enable)"
type = string
default = "disable"
validation {
condition = contains(["enable", "disable"], var.auto_accept_shared_attachments)
error_message = "`auto_accept_shared_attachments` must be one of: \"enable\", \"disable\"."
}
}
variable "default_route_table_association" {
description = "Whether resource attachments are automatically associated with the default association route table (valid values: disable, enable)"
type = string
default = "enable"
validation {
condition = contains(["enable", "disable"], var.default_route_table_association)
error_message = "`default_route_table_association` must be one of: \"enable\", \"disable\"."
}
}
variable "default_route_table_propagation" {
description = "Whether resource attachments automatically propagate routes to the default propagation route table (valid values: disable, enable)"
type = string
default = "enable"
validation {
condition = contains(["enable", "disable"], var.default_route_table_propagation)
error_message = "`default_route_table_propagation` must be one of: \"enable\", \"disable\"."
}
}
variable "description" {
description = "Description of the EC2 Transit Gateway"
type = string
default = null
}
variable "dns_support" {
description = "Whether DNS support is enabled (valid values: disable, enable)"
type = string
default = "enable"
validation {
condition = contains(["enable", "disable"], var.dns_support)
error_message = "`dns_support` must be one of: \"enable\", \"disable\"."
}
}
variable "security_group_referencing_support" {
description = "Whether Security Group Referencing Support is enabled. Valid values: disable, enable"
type = string
default = "enable"
validation {
condition = contains(["enable", "disable"], var.security_group_referencing_support)
error_message = "`security_group_referencing_support` must be one of: \"enable\", \"disable\"."
}
}
variable "tags" {
description = "Map of tags to apply to the TGW and associated resources"
type = map(string)
default = {}
}
variable "vpn_ecmp_support" {
description = "Whether VPN Equal Cost Multipath Protocol support is enabled (valid values: disable, enable)"
type = string
default = "disable"
validation {
condition = contains(["enable", "disable"], var.vpn_ecmp_support)
error_message = "`vpn_ecmp_support` must be one of: \"enable\", \"disable\"."
}
}
variable "prefix_list_references" {
description = "List of TGW prefix list references to add to TGW route tables"
type = list(object({
# `name` used as for_each key
name = string
prefix_list_id = string
# name from `route_tables` or id of a pre-existing route table
transit_gateway_route_table = string
blackhole = optional(bool, false)
default_route_table = optional(bool, false)
# name from `vpc_attachments` or id of a pre-existing tgw attachment
transit_gateway_attachment = optional(string)
}))
default = []
}
variable "route_tables" {
description = "List of TGW route tables to create with the transit gateway"
type = list(object({
# `name` used as for_each key
name = string
tags = map(string)
}))
default = []
}
variable "routes" {
description = "List of TGW routes to add to TGW route tables"
type = list(object({
# `name` used as for_each key
name = string
blackhole = bool
default_route_table = bool
destination_cidr_block = string
# name from `vpc_attachments` or id of a pre-existing tgw attachment
transit_gateway_attachment = string
# name from `route_tables` or id of a pre-existing route table
transit_gateway_route_table = string
}))
default = []
}
variable "vpc_attachments" {
description = "List of VPC attachments to create with the transit gateway"
type = list(object({
# `name` used as for_each key
name = string
subnet_ids = list(string)
appliance_mode_support = string
dns_support = string
ipv6_support = string
tags = map(string)
vpc_routes = optional(list(object({
# `name` is used as for_each key
name = string
route_table_id = string
destination_cidr_block = optional(string)
destination_ipv6_cidr_block = optional(string)
destination_prefix_list_id = optional(string)
})), [])
transit_gateway_default_route_table_association = bool
transit_gateway_default_route_table_propagation = bool
# name from `route_tables` or id of a pre-existing route table
transit_gateway_route_table_association = string
# list of route table names from `route_tables` or ids of pre-existing route tables
transit_gateway_route_table_propagations = list(string)
}))
default = []
}