Terraform resource: aws lb listener

From wikieduonline
(Redirected from Aws lb listener)
Jump to navigation Jump to search
  • Terraform resource: aws_lb_listener

Examples[edit]

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#redirect-action

resource "aws_lb_listener" "front_end" {
 load_balancer_arn = aws_lb.front_end.arn
 port              = "80"
 protocol          = "HTTP"

 default_action {
   type = "redirect"

   redirect {
     port        = "443"
     protocol    = "HTTPS"
     status_code = "HTTP_301"
   }
 }
}

Arguments[edit]

Required:

Optional:

Errors[edit]

Related terms[edit]

See also[edit]

Advertising: