【问题标题】:How to create private hostzone on Route53 with Cloudformation如何使用 Cloudformation 在 Route53 上创建私有主机区域
【发布时间】:2016-04-12 17:43:24
【问题描述】:

我正在尝试在 route53 上创建一个私有主机区域,但看起来我在创建/更新我的 cloudformation 堆栈时看到了错误。

错误

17:35:41 UTC+0550 CREATE_FAILED AWS::Route53::HostedZone RancherRoute53HostedZone 属性 VPC 的值必须是 List 类型

Cloudformation 模板 - YAML

RancherRoute53HostedZone: 特性: 名称:'test.com' VPC: - 参考:VPC 类型:AWS::Route53::HostedZone

【问题讨论】:

    标签: amazon-web-services yaml amazon-route53 amazon-cloudformation


    【解决方案1】:

    编辑 :在您的示例中,如错误消息所示,您需要将 VPC ID 放在列表中 [即使它是一个]。这应该可以解决问题。


    我查看了 Route 53 托管区域的 CloudFormation 参考,发现如果参数集包含 VPC id,则会导致创建私有区域。

    {
      "Type" : "AWS::Route53::HostedZone",
      "Properties" : {
        "HostedZoneConfig" : { HostedZoneConfig },
        "HostedZoneTags" : [  HostedZoneTags, ... ],
        "Name" : String,
        "VPCs" : [ HostedZoneVPCs, ... ]   <---- Private Zone 
      }
    }
    

    更多信息:http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html

    【讨论】:

    • 这不是问题。问题是语法是一个对象,就像"VPCs" : [{ "VPCId" : {"Ref" : "VPC"}, "VPCRegion" : {"Ref": "AWS::Region"} }]
    猜你喜欢
    • 2017-07-25
    • 1970-01-01
    • 1970-01-01
    • 2021-03-02
    • 1970-01-01
    • 1970-01-01
    • 2023-03-06
    • 2019-12-09
    • 1970-01-01
    相关资源
    最近更新 更多