-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
277 lines (235 loc) · 7.63 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
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
variable "hello_world_aws_region" {
description = "Hello world AWS region"
type = string
default = "us-east-2"
}
/* */
variable "hello_world_aws_vpc_cidr_block" {
description = "Hello World AWS VPC CIDR block"
type = string
default = "10.0.0.0/16"
}
variable "hello_world_aws_vpc_cidr_newbits" {
description = "Hello World AWS VPC CIDR new bits"
type = number
default = 4
}
/* */
# Start Comment Block
# These variables are unnecessarily complex.
# We could just accept a list of availability zones,
# or even just a number of availability zones and use the aws_availability_zones data source with the region to grab them automatically.
# Unfortunantely, this is something we cannot mask from the source/stitcher;
# it needs to be better abstracted in the module itself.
variable "hello_world_public_igw_cidr_blocks" {
type = map(number)
description = "Hello World Availability Zone CIDR Mapping for Public IGW subnets"
default = {
"us-east-2a" = 1
"us-east-2b" = 2
"us-east-2c" = 3
}
}
/* */
variable "hello_world_private_ngw_cidr_blocks" {
type = map(number)
description = "Hello World Availability Zone CIDR Mapping for Private NGW subnets"
default = {
"us-east-2a" = 4
"us-east-2b" = 5
"us-east-2c" = 6
}
}
/* */
variable "hello_world_private_isolated_cidr_blocks" {
type = map(number)
description = "Hello World Availability Zone CIDR Mapping for Private isolated subnets"
default = {
"us-east-2a" = 7
"us-east-2b" = 8
"us-east-2c" = 9
}
}
# End Comment Block
/* */
variable "acme_aws_ecs_cluster_name" {
description = "Acme AWS ECS Cluster Name"
type = string
default = "acme"
}
variable "acme_api_aws_ecs_service_name" {
description = "Acme API AWS ECS Service Name"
type = string
default = "acme-api"
}
variable "acme_api_aws_ecs_container_name" {
description = "Acme API AWS ECS Container Name"
type = string
default = "acme-api"
}
/* */
// We don't support List<Map> in the sdk yet; this parameter will remain defaulted and not exposed in the source
variable "acme_api_alb_aws_security_group_rules" {
description = "Acme API ALB AWS Security Group rules"
type = list(object({
rule_type = string
description = string
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
}))
default = [
{
rule_type = "ingress"
description = "HTTP"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
},
{
rule_type = "ingress"
description = "HTTPS"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
},
{
rule_type = "egress"
description = "Outbound"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
]
}
// If this is set to true, it's impossible to test; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_alb_internal" {
description = "Acme API AWS ALB internal"
type = bool
default = false
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_alb_load_balancer_type" {
description = "Acme API AWS ALB load balancer type"
type = string
default = "application"
}
variable "acme_api_aws_lb_target_group_port" {
description = "Acme API AWS LB target group port"
type = number
default = 8000
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_lb_target_group_protocol" {
description = "Acme API AWS LB target group protocol"
type = string
default = "HTTP"
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_lb_target_group_target_type" {
description = "Acme API AWS LB target group target type"
type = string
default = "ip"
}
variable "acme_api_aws_lb_target_group_health_check_enabled" {
description = "Acme API AWS LB target group health check enabled"
type = bool
default = true
}
variable "acme_api_aws_lb_target_group_health_check_path" {
description = "Acme API AWS LB target group health check path"
type = string
default = "/healthy"
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_alb_listener_port" {
description = "Acme API AWS ALB listener port"
type = string
default = "80"
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_alb_listener_protocol" {
description = "Acme API AWS ALB listener protocol"
type = string
default = "HTTP"
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_alb_listener_default_action_type" {
description = "Acme API AWS ALB listener default action type"
type = string
default = "forward"
}
/* */
// Our sdk doesn't support List<Map> so we have no way to ingest this; for now it will be re-defined in main.tf using the port variable instead.
variable "acme_api_aws_security_group_rules" {
description = "Acme API AWS Security Group rules"
type = list(object({
rule_type = string
description = string
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
}))
default = [
{
rule_type = "ingress"
description = "acme-api"
from_port = 8000
to_port = 8000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
},
{
rule_type = "egress"
description = "Outbound"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
]
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_ecs_service_launch_type" {
description = "Acme API AWS ECS Service launch type"
type = string
default = "FARGATE"
}
// We really only need to accept the image url; everything else here was already declared in other variables.
variable "image_url" {
description = "Image Url for the Docker image to use"
type = string
default = "public.ecr.aws/tinystacks/aws-docker-templates-express:latest-x86"
}
variable "acme_api_aws_ecs_task_definition_cpu" {
description = "Acme API AWS ECS task definition cpu"
type = number
default = 256
}
variable "acme_api_aws_ecs_task_definition_memory" {
description = "Acme API AWS ECS task definition memory"
type = number
default = 512
}
// This won't work for any value other than the default; this parameter will remain defaulted and not exposed in the source
variable "acme_api_aws_ecs_task_definition_requires_compatibilities" {
description = "Acme API AWS ECS task definition requires compatibilities"
type = list(string)
default = ["FARGATE"]
}
variable "acme_api_aws_ecs_service_desired_count" {
description = "Acme API AWS ECS service desired count"
type = number
default = 1
}
variable "acme_api_aws_iam_role_ecs_task_execution_role_name" {
description = "Acme API AWS IAM role ECS task execution role name"
type = string
default = "ecs-task-execution-role"
}
/* */