Difference between revisions of "Terraform resource: aws lb listener"

From wikieduonline
Jump to navigation Jump to search
Line 39: Line 39:
 
* <code>[[protocol]]</code> https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#protocol
 
* <code>[[protocol]]</code> https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#protocol
  
* action block: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_rule#action-blocks
+
* action block: [[forward]], [[redirect]], [[fixed-response]], [[authenticate-cognito]] and [[authenticate-oidc]]. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_rule#action-blocks
  
 
== Related terms ==
 
== Related terms ==

Revision as of 10:55, 12 April 2023

  • Terraform resource: aws_lb_listener

Examples

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

Required:

Optional:

Related terms

See also

Advertising: