繁体   English   中英

如何使用Cloudformation在Route53上创建私有主机区域

[英]How to create private hostzone on Route53 with Cloudformation

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

错误

17:35:41 UTC+0550  CREATE_FAILED   AWS::Route53::HostedZone    RancherRoute53HostedZone    Value of property VPCs must be of type List

Cloudformation模板-YAML

RancherRoute53HostedZone:
    Properties:
      Name: 'test.com'
      VPCs:
        - 
          Ref: VPC
    Type : AWS::Route53::HostedZone

编辑 :在您的示例中,如错误消息所示,您需要将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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM