-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
214 lines (181 loc) · 4.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
# variables.tf
variable "access_key" {}
variable "secret_key" {}
variable "aws_alb_name" {
description = "Specifying the name for aws_alb"
default = "myapp-load-balancer"
}
variable "aws_target_name" {
description = "name of target group"
default = "myapp-target-group"
}
#for backend
variable "aws_backend_target_name" {
description = "name of target group"
default = "backend-target-group"
}
variable "target_app_portocol" {
description = "name of target protocol"
default = "HTTP"
}
#for backend
variable "target_backend_portocol" {
description = "name of target protocol"
default = "HTTP"
}
variable "app_target_type" {
description = "name of target type"
default = "ip"
}
# for backend
variable "backend_target_type" {
description = "name of target type"
default = "ip"
}
variable "alb_listener_protocol" {
# description = "name of target type"
default = "HTTP"
}
variable "alb_listener_default_type" {
# description = "name of target type"
default = "forward"
}
variable "aws_ecs_cluster_name" {
default = "myapp-cluster"
}
variable "aws_ecs_task_definition_family" {
default = "myapp-task"
}
#for backend
variable "aws_ecs_backend_task_definition_family" {
default = "backend-task"
}
variable "aws_ecs_task_definition_network_mode" {
default = "awsvpc"
}
variable "aws_ecs_task_definition_requires_compatibilities" {
description = "using it at two places one for aws ecs service and other task "
default = "FARGATE" #"[ FARGATE ]"
}
variable "aws_ecs_service_launch_type" {
default = "FARGATE"
}
variable "load_balancer_container_name" {
default = "myapp"
}
# for backend
variable "load_balancer_backend_container_name" {
default = "backend"
}
variable "aws_ecs_service_name" {
default = "myapp-service"
}
# for backend
variable "aws_ecs_backend_service_name" {
default = "backend-service"
}
variable "aws_security_group_name" {
default = "myapp-load-balancer-security-group"
description = "controls access to the ALB"
}
variable "aws_security_group_ecs_task_name" {
default = "myapp-ecs-tasks-security-group"
description = "allow inbound access from the ALB only"
}
variable "aws_cloudwatch_log_stream_name" {
default = "my-log-stream"
}
#for backend
variable "aws_cloudwatch_backend_log_stream_name" {
default = "backend"
}
variable "aws_cloudwatch_log_group_name" {
default = "/ecs/myapp"
}
#for backend
variable "aws_cloudwatch_backend_log_group_name" {
default = "/ecs/backend"
}
variable "aws_cloudwatch_log_group_tag_name" {
default = "cb-log-group"
}
variable "aws_region" {
description = "The AWS region things are created in"
default = "ap-southeast-1"
}
variable "ecs_task_execution_role_name" {
description = "ECS task execution role name"
default = "myEcsTaskExecutionRole"
}
variable "az_count" {
description = "Number of AZs to cover in a given region"
default = "2"
}
variable "app_image" {
description = "Docker image to run in the ECS cluster"
default = "446712091027.dkr.ecr.ap-southeast-1.amazonaws.com/web:est-app"
}
# for Backend Service and backend task def
variable "backend_image" {
description = "Docker image to run in the ECS cluster"
default = "446712091027.dkr.ecr.ap-southeast-1.amazonaws.com/web:est-app"
}
variable "app_port" {
description = "Port exposed by the docker image to redirect traffic to"
default = 3000
}
# for backend
variable "backend_port" {
description = "Port exposed by the docker image to redirect traffic to"
default = 80
}
variable "app_port2" {
description = "Port exposed for the listener in ALB to redirect traffic to"
default = 80
}
variable "app_count" {
description = "Number of docker containers to run"
default = 1
}
variable "backend_count" {
description = "Number of docker containers to run"
default = 1
}
variable "health_check_path" {
default = "/"
}
variable "health_healthy_threshold" {
default = "3"
}
variable "health_interval" {
default = "30"
}
variable "health_protocol" {
default = "HTTP"
}
variable "health_matcher" {
default = "200"
}
variable "health_timeout" {
default = "3"
}
variable "health_unhealthy_threshold" {
default = "2"
}
variable "fargate_cpu" {
description = "Fargate instance CPU units to provision (1 vCPU = 1024 CPU units)"
default = "1024"
}
# for backend
variable "backend_cpu" {
description = "Fargate instance CPU units to provision (1 vCPU = 1024 CPU units)"
default = "1024"
}
variable "fargate_memory" {
description = "Fargate instance memory to provision (in MiB)"
default = "2048"
}
variable "backend_memory" {
description = "Fargate instance memory to provision (in MiB)"
default = "2048"
}