1

I'm trying to output static IPs from the AWS global accelerator, but according to AWS docs, the only available attributes are AcceleratorArn and DnsName. Is there some way I can output the static IPs? See below sample CF script

AWSTemplateFormatVersion: 2010-09-09
Description: CloudFormation template to deploy Global Accelerator
Parameters:
LoadbalancerARN:
        Description: Application Load Balancer ARN to be used as Global Accelerator endpoint
        Type: String
Resources:
    SampleAccelerator:
    Type: 'AWS::GlobalAccelerator::Accelerator'
    Properties:
        Name: MySampleAccelerator
        IpAddressType: "IPV4"
        Enabled: true
    SampleListener:
        Type: 'AWS::GlobalAccelerator::Listener'
        Properties:
            AcceleratorArn: !Ref SampleAccelerator
            Protocol: TCP
            PortRanges:
            - FromPort: '80'
                ToPort: '80'
    UsWest2EndpointGroup:
        Type: 'AWS::GlobalAccelerator::EndpointGroup'
        Properties:
            ListenerArn: !Ref SampleListener
            EndpointGroupRegion: us-west-2
            EndpointConfigurations:
            - EndpointId: !Ref LoadbalancerARN
                ClientIPPreservationEnabled: true
Outputs:
    AcceleratorDNS:
    Description: DNS for Global Accelerator
    Value: !GetAtt SampleAccelerator.DnsName
samtoddler
  • 8,463
  • 2
  • 26
  • 21
Gowtham Babu
  • 109
  • 1
  • 9
  • 1
    In general, if something is not available via the `CloudFormation`, the idea is to implement a [custom resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html). There is [DescribeAccelerator](https://docs.aws.amazon.com/global-accelerator/latest/api/API_DescribeAccelerator.html) call you can use which provides IP Address details. – samtoddler Mar 11 '21 at 20:29

0 Answers0