1

我正在尝试从 AWS 全球加速器输出静态 IP,但根据AWS docs,唯一可用的属性是AcceleratorArnand DnsName。有什么方法可以输出静态IP吗?请参见下面的示例 CF 脚本

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
4

0 回答 0