resource "aws_lb_listener_rule" "redirect" {
listener_arn = aws_lb_listener.https.arn
priority = 90
action {
type = "redirect"
redirect {
host = "example.com"
path = "/#{path}"
port = "443"
protocol = "HTTPS"
query = "#{query}"
status_code = "HTTP_301"
}
}
condition {
field = "host-header"
values = ["www.example.com"]
}
}
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
1