copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Feature request: Export load balancer ARN from the application CF template

Open perevernihata opened this issue 5 years ago • 3 comments

Currently, only PublicLoadBalancerDNSName is exported, therefore if you want to add custom listeners via addon - it is not possible without some custom resource (lambda) to find correct ALB which will be complicated. Should be easy to change? :)

  PublicLoadBalancerArm:
    Condition: CreatePublicLoadBalancer
    Value: !GetAtt PublicLoadBalancer.Arn
    Export:
      Name: !Sub ${AWS::StackName}-PublicLoadBalancerArn

Just add to this file? https://github.com/aws/copilot-cli/blob/87308f4a50fe22dd3e8c85b9ea567bdca51053de/templates/environment/versions/cf-v1.0.0.yml

perevernihata avatar Sep 25 '20 19:09 perevernihata

Hello @perevernihata. Good call! It's already on our schedule. We have a plan for adding this output after the feature of enabling users to upgrade their environment.

iamhopaul123 avatar Sep 25 '20 19:09 iamhopaul123

@iamhopaul123 Any update on this feature? Would love to get the Load Balancer's ARN for use in an environment addons stack

bathsundeep-graticule avatar Jan 11 '24 18:01 bathsundeep-graticule

We currently have a workaround for it: you can use env override and deploy the env with the following override file

- op: add
  path: /Outputs/PublicLoadBalancerArn
  value:
    Condition: CreatePublicLoadBalancer
    Value: !GetAtt PublicLoadBalancer.Arn
    Export:
      Name: !Sub ${AWS::StackName}-PublicLoadBalancerArn

iamhopaul123 avatar Jan 11 '24 20:01 iamhopaul123