File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ resource "aws_alb_target_group" "target_group" {
6060 unhealthy_threshold = " ${ var . health_check_unhealthy_threshold } "
6161 timeout = " ${ var . health_check_timeout } "
6262 protocol = " ${ var . backend_protocol } "
63+ matcher = " ${ var . health_check_code } "
6364 }
6465
6566 stickiness {
Original file line number Diff line number Diff line change 3333 its ( :health_check_path ) { should eq '/' }
3434 its ( :health_check_port ) { should eq 'traffic-port' }
3535 its ( :health_check_protocol ) { should eq 'HTTP' }
36+ its ( :health_check_code ) { should eq '200-299' }
3637 it { should belong_to_alb ( 'my-alb' ) }
3738 it { should belong_to_vpc ( 'my-vpc' ) }
3839 end
Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ variable "health_check_unhealthy_threshold" {
8080 default = 3
8181}
8282
83+ variable "health_check_code" {
84+ description = " The HTTP codes that are a success when checking TG health"
85+ default = " 200-299"
86+ }
87+
8388variable "create_log_bucket" {
8489 description = " Create the S3 bucket (named with the log_bucket_name var) and attach a policy to allow ALB logging."
8590 default = false
You can’t perform that action at this time.
0 commit comments