File tree 2 files changed +9
-9
lines changed
exercises/exercise4/modules
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,13 @@ resource "aws_alb_target_group" "api" {
129
129
vpc_id = var. vpc_id
130
130
port = 8080
131
131
protocol = " HTTP"
132
+
133
+ health_check {
134
+ path = " /ok"
135
+ interval = 5
136
+ healthy_threshold = 3
137
+ unhealthy_threshold = 6
138
+ }
132
139
}
133
140
134
141
resource "aws_alb_listener" "front_end" {
@@ -167,7 +174,8 @@ resource "aws_alb_listener_rule" "api_rule1" {
167
174
values = [
168
175
" /languages" ,
169
176
" /languages/*" ,
170
- " /languages/*/*"
177
+ " /languages/*/*" ,
178
+ " /ok"
171
179
]
172
180
}
173
181
}
Original file line number Diff line number Diff line change @@ -36,14 +36,6 @@ resource "aws_security_group" "alb" {
36
36
cidr_blocks = [" 0.0.0.0/0" ]
37
37
}
38
38
39
- ingress {
40
- description = " 8080 from anywhere"
41
- from_port = 8080
42
- to_port = 8080
43
- protocol = " tcp"
44
- cidr_blocks = [" 0.0.0.0/0" ]
45
- }
46
-
47
39
egress {
48
40
from_port = 0
49
41
to_port = 0
You can’t perform that action at this time.
0 commit comments