How to create a subdomain Hosted Zone using Cloud Formation
<p>I'd like to create a Route53 Hosted Zone for a subdomain and <code>NS</code> record to parent domain.</p>

<p>Let's say I have:</p>

<pre><code>example.com
</code></pre>

<p>and I want a hosted zone for subdomain:</p>

<pre><code>build.example.com
</code></pre>

<p>Hosted Zone creation works:</p>

<pre><code>ClusterHostedZone:
  Type: "AWS::Route53::HostedZone"
  Properties:
    Name: !Ref DomainName
    HostedZoneConfig:
      Comment: Managed by Cloud Formation
    HostedZoneTags:
      - Key: KubernetesCluster
        Value: !Ref KubernetesCluster
</code></pre>

<p>Delegating responsibility for the subdomain don't:</p>

<pre><code>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
</code></pre>

<p>This is not implemented and I don't know <strong>how to get this information</strong>:</p>

<pre><code>ResourceRecords: !GetAtt ClusterHostedZone.NameServers
</code></pre>

<p>Is this simple feature just missing in Cloud Formation?</p>