From 6f88b061853523beb65bd25b464904757b95592b Mon Sep 17 00:00:00 2001 From: Khai Do <3697686+zaro0508@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:40:54 -0800 Subject: [PATCH] Fix cloudformation load balancer ouput (#4) 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 --- src/load_balancer_stack.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/load_balancer_stack.py b/src/load_balancer_stack.py index b9061ad..32dd73f 100644 --- a/src/load_balancer_stack.py +++ b/src/load_balancer_stack.py @@ -21,4 +21,9 @@ def __init__( self.alb = elbv2.ApplicationLoadBalancer( self, "AppLoadBalancer", vpc=vpc, internet_facing=True ) - cdk.CfnOutput(self, "dns", value=self.alb.load_balancer_dns_name) + cdk.CfnOutput( + self, + "LoadBalancerDns", + value=self.alb.load_balancer_dns_name, + export_name=f"{construct_id}-dns", + )