Skip to content

Commit

Permalink
Fix cloudformation load balancer ouput
Browse files Browse the repository at this point in the history
We depend on the cloudformation's load balancer exported DNS endpoint
to configure a DNS redirect in organizations-infra repo[1].  The export
name needs to be unique in the account.

[1] https://github.com/Sage-Bionetworks-IT/organizations-infra/blob/master/org-formation/800-redirects/_tasks.yaml
  • Loading branch information
zaro0508 committed Nov 15, 2024
1 parent 518b31e commit dd1625b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/load_balancer_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(
construct_id: str,
vpc: ec2.Vpc,
idle_timeout_seconds: int,
**kwargs
**kwargs,
) -> None:
super().__init__(scope, construct_id, **kwargs)

Expand All @@ -30,4 +30,6 @@ def __init__(
idle_timeout=cdk.Duration.seconds(idle_timeout_seconds),
internet_facing=True,
)
cdk.CfnOutput(self, "dns", value=self.alb.load_balancer_dns_name)
cdk.CfnOutput(
self, f"{construct_id}-dns", value=self.alb.load_balancer_dns_name
)

0 comments on commit dd1625b

Please sign in to comment.