Skip to content

Commit

Permalink
allowing http non encrypted traffic for internal ALB
Browse files Browse the repository at this point in the history
  • Loading branch information
robertomoutinho committed Nov 30, 2023
1 parent 15d060a commit 54abccc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions load_balancer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ module "alb" {
# HTTPS redirects are enabled only for public facing ALB
resource "aws_lb_listener" "allow_http" {
count = var.enable_alb && var.alb_internal ? 0 : 1
load_balancer_arn = module.alb.0.this_lb_arn
load_balancer_arn = module.alb[0].this_lb_arn
port = "80"
protocol = "HTTP"

default_action {
type = "forward"
target_group_arn = module.alb.0.target_group_arns[0]
target_group_arn = module.alb[0].target_group_arns[0]
}
}

# Allow non-encrypted traffic for internal ALB onb port 80
resource "aws_lb_listener" "force_https" {
count = var.enable_alb && var.alb_internal ? 1 : 0
load_balancer_arn = module.alb.0.this_lb_arn
load_balancer_arn = module.alb[0].this_lb_arn
port = "80"
protocol = "HTTP"

Expand Down

0 comments on commit 54abccc

Please sign in to comment.