我想爲子域名創建Route53託管區域,併爲父域創建NS
記錄。如何使用Cloud Formation創建子域名託管區域
比方說,我有:
example.com
,我想子站點託管區:
build.example.com
託管區的創建工作:
ClusterHostedZone:
Type: "AWS::Route53::HostedZone"
Properties:
Name: !Ref DomainName
HostedZoneConfig:
Comment: Managed by Cloud Formation
HostedZoneTags:
- Key: KubernetesCluster
Value: !Ref KubernetesCluster
爲子域唐委派責任't:
ParentHostedZoneClusterRecord:
Type: "AWS::Route53::RecordSet"
Properties:
Name: !Ref DomainName
Comment: Managed by Cloud Formation
HostedZoneId: !Ref ParentHostedZoneID
TTL: 30
Type: NS
ResourceRecords: !GetAtt ClusterHostedZone.NameServers
這沒有實現,我不知道如何得到這個信息:
ResourceRecords: !GetAtt ClusterHostedZone.NameServers
這是簡單的功能,只是在雲的形成缺少什麼?
RecordSetGroup會是一個解決方案嗎? http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordsetgroup.html – masterforker
對不起,但我沒有看到如何幫助。你能詳細說明一下嗎? –
我正確理解你想在你的託管區域下關聯一堆別名? – masterforker