File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
operations/deployment/terraform/modules/aws/ecs Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ resource "aws_alb_listener_rule" "redirect_based_on_path_for_http" {
193193
194194resource "aws_lb_listener_rule" "redirect_www_to_apex" {
195195 count = var. aws_ecs_lb_www_to_apex_redirect && var. aws_r53_domain_name != " " ? 1 : 0
196- listener_arn = var. aws_certificates_selected_arn != " " ? aws_alb_listener. https_redirect [0 ]. arn : aws_alb_listener. http_redirect [0 ]. arn
196+ listener_arn = var. aws_certificate_enabled ? aws_alb_listener. lb_listener_ssl [0 ]. arn : aws_alb_listener. lb_listener [0 ]. arn
197197 priority = 10
198198
199199 condition {
@@ -206,8 +206,8 @@ resource "aws_lb_listener_rule" "redirect_www_to_apex" {
206206 type = " redirect"
207207
208208 redirect {
209- port = var. aws_certificates_selected_arn != " " ? " 443" : " 80"
210- protocol = var. aws_certificates_selected_arn != " " ? " HTTPS" : " HTTP"
209+ port = var. aws_certificate_enabled ? " 443" : " 80"
210+ protocol = var. aws_certificate_enabled ? " HTTPS" : " HTTP"
211211 status_code = " HTTP_301"
212212 host = " ${ var . aws_r53_domain_name } "
213213 path = " /#{path}"
You can’t perform that action at this time.
0 commit comments