-
-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional redirect due to cutting the path value #387
Comments
This issue has been automatically marked as stale because it has been open 30 days |
Anyone is going to look into it? |
This issue has been automatically marked as stale because it has been open 30 days |
Anyone is going to look into it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I was building a private S3 website behind the штеуктфд load balancer using this guide:
https://aws.amazon.com/blogs/networking-and-content-delivery/hosting-internal-https-static-websites-with-alb-s3-and-privatelink/
Manually everything worked, but not via Terraform
Versions
Module version: 9.12.0
Terraform version: 1.98.0
Provider version(s): 5.75.1
Reproduction Code [Required]
Steps to reproduce the behavior:
feel free to replace acm and other local variable wit your values
Expected behavior
Terraform plan should show that it will create a path as I defined
+ host = "#{host}"
+ path = "/#{path}index.html"
+ port = "#{port}"
+ protocol = "HTTPS"
+ query = "#{query}"
+ status_code = "HTTP_301"
}
Actual behavior
But it cut index.html.part
+ host = "#{host}"
+ path = "/#{path}index.html"
+ port = "#{port}"
+ protocol = "HTTPS"
+ query = "#{query}"
+ status_code = "HTTP_301"
}
Terminal Output Screenshot(s)
That's why I keep on seeing this error, and and basically terraform apply failed:
module.alb.aws_lb_listener_rule.this["ex-https/web-redirect"]: Creating...
╷
│ Error: creating ELBv2 Listener Rule: operation error Elastic Load Balancing v2: CreateRule, https response error StatusCode: 400, RequestID: 3453453-7b38-48ed-a177-34534543, InvalidLoadBalancerAction: The redirect configuration is not valid because it creates a loop.
Additional context
So as a fix, I commented rules section in ALB module and created them like this and the path was created as I provided, with index.html in the end:
The text was updated successfully, but these errors were encountered: