Home > database >  Getting DNS of an LB with CloudFormation
Getting DNS of an LB with CloudFormation

Time:12-02

I wrote a template in CF and a Load Blancer is created in that template. Is there any way to let the stack 'print' the DNS name of the LB? I know how to do that in Terraform but i require to do that in CloudFormation.

CodePudding user response:

DNSName is a returned value from AWS::ElasticLoadBalancingV2::LoadBalancer. So in your Outputs you can "print" it out:

Outputs:
  ALBDNS:
    Value: !GetAtt MyALB.DNSName

where MyALB is the name of your ALB resource.

  • Related