aws cloudformation ,:无法为elb创建别名

时间:2018-11-19 21:11:09

标签: amazon-web-services amazon-cloudformation amazon-elb

目的是在Route 53中为弹性负载均衡器域名创建别名。

MicroserviceLoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
  LoadBalancerAttributes:
    - Key: idle_timeout.timeout_seconds
      Value: '60'
  Name: !Sub '${AppName}-LB'
  Scheme: internal
  SecurityGroups: !Ref SecurityGroups
  Subnets: !Ref 'Subnets'
  Type: application
  IpAddressType: ipv4


  LoadBalancerAlias:
    Type: AWS::Route53::RecordSet
    Properties:
      Type: A
      Name:
        Fn::Join:
        - ''
        - - !Sub logging-${Environment}.
          - !ImportValue tech:localdomain
          - .
      HostedZoneId: !ImportValue 'tech:route53:internal:hostedzone'
      ResourceRecords:
      - Fn::GetAtt:
        - MicroserviceLoadBalancer
        - DNSName

失败,说

  

嵌入式堆栈   未成功创建:以下资源无法执行   创建:[LoadBalancerAlias]。

我也尝试过,但是仍然失败

Type: AWS::Route53::RecordSet
Properties:
  Type: A
  AliasTarget: 
    HostedZoneId: !ImportValue 'tech:route53:internal:hostedzone'
    DNSName: !GetAtt MicroserviceLoadBalancer.DNSName
    EvaluateTargetHealth: Boolean
  Name:
    Fn::Join:
    - ''
    - - !Sub logging-${Environment}.
      - !ImportValue tech:localdomain
      - .
  HostedZoneId: !ImportValue 'tech:route53:internal:hostedzone'

不幸的是,该错误消息足够详细,可以查明失败的原因。我需要帮助弄清楚这一点。

0 个答案:

没有答案