forked from cloudposse/terraform-aws-dynamic-subnets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
193 lines (164 loc) · 5.48 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
variable "enabled" {
type = bool
default = true
description = "Set to false to prevent the module from creating any resources"
}
variable "subnet_type_tag_key" {
type = string
default = "cpco.io/subnet/type"
description = "Key for subnet type tag to provide information about the type of subnets, e.g. `cpco.io/subnet/type=private` or `cpco.io/subnet/type=public`"
}
variable "subnet_type_tag_value_format" {
default = "%s"
description = "This is using the format interpolation symbols to allow the value of the subnet_type_tag_key to be modified."
type = string
}
variable "max_subnet_count" {
default = 0
description = "Sets the maximum amount of subnets to deploy. 0 will deploy a subnet for every provided availablility zone (in `availability_zones` variable) within the region"
}
variable "vpc_id" {
type = string
description = "VPC ID where subnets will be created (e.g. `vpc-aceb2723`)"
}
variable "igw_id" {
type = string
description = "Internet Gateway ID the public route table will point to (e.g. `igw-9c26a123`)"
}
variable "cidr_block" {
type = string
description = "Base CIDR block which will be divided into subnet CIDR blocks (e.g. `10.0.0.0/16`)"
}
variable "availability_zones" {
type = list(string)
description = "List of Availability Zones where subnets will be created"
}
variable "vpc_default_route_table_id" {
type = string
default = ""
description = "Default route table for public subnets. If not set, will be created. (e.g. `rtb-f4f0ce12`)"
}
variable "public_network_acl_id" {
type = string
default = ""
description = "Network ACL ID that will be added to public subnets. If empty, a new ACL will be created"
}
variable "private_network_acl_id" {
type = string
description = "Network ACL ID that will be added to private subnets. If empty, a new ACL will be created"
default = ""
}
variable "nat_gateway_enabled" {
type = bool
description = "Flag to enable/disable NAT Gateways to allow servers in the private subnets to access the Internet"
default = true
}
variable "nat_instance_enabled" {
type = bool
description = "Flag to enable/disable NAT Instances to allow servers in the private subnets to access the Internet"
default = false
}
variable "nat_instance_type" {
type = string
description = "NAT Instance type"
default = "t3.micro"
}
variable "existing_nat_ips" {
type = list(string)
default = []
description = "Existing Elastic IPs to attach to the NAT Gateway or Instance instead of creating a new one."
}
variable "map_public_ip_on_launch" {
type = bool
default = true
description = "Instances launched into a public subnet should be assigned a public IP address"
}
variable "private_subnets_additional_tags" {
type = map(string)
default = {}
description = "Additional tags to be added to private subnets"
}
variable "public_subnets_additional_tags" {
type = map(string)
default = {}
description = "Additional tags to be added to public subnets"
}
variable "additional_tag_map" {
type = map(string)
default = {}
description = "Additional tags for appending to each tag map"
}
variable "label_order" {
type = list(string)
default = []
description = "The naming order of the ID output and Name tag"
}
variable "regex_replace_chars" {
type = string
default = "/[^a-zA-Z0-9-]/"
description = "Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed"
}
variable "tags" {
description = "Additional tags to apply to all resources that use this label module"
type = map(string)
default = {}
}
variable "namespace" {
type = string
default = ""
description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'"
}
variable "stage" {
type = string
default = ""
description = "Stage, e.g. 'prod', 'staging', 'dev', or 'test'"
}
variable "name" {
type = string
default = ""
description = "Solution name, e.g. 'app' or 'cluster'"
}
variable "environment" {
type = string
description = "The environment name if not using stage"
default = ""
}
variable "attributes" {
type = list(string)
description = "Any extra attributes for naming these resources"
default = []
}
variable "delimiter" {
type = string
default = "-"
description = "Delimiter to be used between `namespace`, `stage`, `name` and `attributes`"
}
variable "context" {
type = object({
namespace = string
environment = string
stage = string
name = string
enabled = bool
delimiter = string
attributes = list(string)
label_order = list(string)
tags = map(string)
additional_tag_map = map(string)
regex_replace_chars = string
})
default = {
namespace = ""
environment = ""
stage = ""
name = ""
enabled = true
delimiter = ""
attributes = []
label_order = []
tags = {}
additional_tag_map = {}
regex_replace_chars = ""
}
description = "Default context to use for passing state between label invocations"
}