Closed legoscia closed 9 months ago
This PR is included in version 4.0.6 :tada:
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
In the definition of the local variable
atlantis_url
, currently attributes ofmodule.alb
are referenced within acoalesce
function call.coalesce
isn't short-circuiting, so even ifvar.atlantis.fqdn
was provided, it won't be used in the case when an existing ALB is used: the reference tomodule.alb.route53_records["A"]
will fail, and the error will be caught by the top-leveltry
, leavingatlantis_url
ashttps://
.In this change, the individual references to
module.alb
are wrapped intry
calls, meaning thatvar.atlantis.fqdn
will be respected if provided.Motivation and Context
This change fixes this issue: https://github.com/terraform-aws-modules/terraform-aws-atlantis/issues/377 With this change, links in the "Checks" section of a Github pull request point to the correct URL.
Breaking Changes
This change can force replacement of the ECS task definition in the case where an existing ALB was used and
var.atlantis.fqdn
was specified (but ignored). If this is not desirable, this can be avoided by removing that variable from the configuration. I believe this is unlikely to happen.How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)[X] I have tested and validated these changes using one or more of the provided
examples/*
projectsI added the
fqdn
variable togithub-separate
, and deployed it without this change. That resulted inATLANTIS_ATLANTIS_URL
being set tohttps://
. Then I ranterraform apply
with this change. That resulted inmodule.atlantis.module.ecs_service.aws_ecs_task_definition.this[0]
being recreated andATLANTIS_ATLANTIS_URL
being set to the URL of the load balancer.pre-commit run -a
on my pull request