aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::Route53::HostedZone - DelegationSetId
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
## 1. Title
`AWS::Route53::HostedZone-DelegationSetId`
## 2. Scope of request
A new attribute, `DelegationSetId`, is desired on the `AWS::Route53::HostedZone` resource type.
* The attribute would be optional.
* The attribute would only be valid with public hosted zones.
When creating a public hosted zone, the Route 53 API allows the caller to specify a `DelegationSetId` that references an existing reusable delegation set. Specifying a reusable delegation set guarantees that the authoritative name servers for the hosted zone are known in advance, which simplifies configuration of delegation in the parent hosted zone.
The delegation set must be created via the API. It is not within the scope of this request to create delegation sets via CloudFormation, but rather to reference an already-created delegation set in an AWS::Route53::HostedZone resource description in a CloudFormation template.
## 3. Expected behavior
- On Create
-
The new hosted zone would contain a single NS record at the zone apex, as it already does, however the 4 name servers in the value of the record would match those of the given reusable delegation set. - On Update
-
- If the `DelegationSetId` attribute is changed from one valid delegation set ID to another valid delegation set ID, then the values of the zone apex NS record would be modified to match the given delegation set.
- If the `DelegationSetId` attribute is removed, then the values of the zone apex NS record would be dynamically generated as they would be when creating a hosted zone without specifying a `DelegationSetId`.
- If the `DelegationSetId` attribute is added to the template of an existing stack that presently did not specify the attribute, then the zone apex NS record would be modified to match the given delegation set.
- On Delete
-
The hosted zone would be deleted, and with it, all record sets including the zone apex NS record, regardless of whether it was generated dynamically or via reusable delegation set.
## 4. Test Case Recommendations
1. Common use case: Create a stack from a template containing a public hosted zone with a valid ID of a reusable delegation given as the string value of `DelegationSetId`.
* Confirm that the zone apex NS record matches those of the delegation set ID.
* Note that `!Ref ` would not apply here, as reusable delegation sets cannot be created through CloudFormation (yet). However the value could be a template parameter or a hard-coded value exported as an output value from another stack.
1. Update case: Update a successfully-created stack containing a public hosted zone whose original template included `DelegationSetId` by removing the property.
* Confirm that the stack update succeeds.
* Confirm that all other record sets remain unchanged.
* Note that, although unlikely, it is remotely possible that the NS records remain unchanged.
1. Update case: Create a stack containing a public hosted zone whose original template did not include `DelegationSetId`, and update the stack by adding the property with a valid delegation set ID.
* Confirm that the zone apex NS record change to the values of the delegation set ID.
* Confirm that all other record sets remain unchanged.
1. Failure case: Specify an invalid delegation set ID for the value of `DelegationSetId` in a public hosted zone resource template passed to `CreateStack`.
1. Failure case: Change a valid delegation set ID to an invalid delegation set ID for the value of `DelegationSetId` in a public hosted zone resource template passed to `UpdateStack`.
1. Failure case: Specify a valid delegation set ID for the value of `DelegationSetId` in a private hosted zone resource template passed to `CreateStack`.
1. Failure case: Create the maximum number of hosted zones allowed by the delegation set in a stack Confirm success. Create one or more hosted zones in a separate stack referencing the same delegation set. Confirm failure.
1. Failure case: Create the maximum number of hosted zones allowed by the delegation set in a stack. Confirm success. Create one or more hosted zones in the same stack template referencing the same delegation set by issuing an `UpdateStack` action. Confirm failure.
1. Failure case: Create a reusable delegation set from an existing hosted zone by specifying the `HostedZoneId` parameter in the `CreateReusableDelegationSet` invocation. Create a CloudFormation stack from a template that includes a hosted zone resource that is a subdomain of the existing hosted zone, with the `DelegationSetId` set to the delegation set generated from the parent domain. This fails because Route 53 [disallows parent zones to delegate to the same nameservers for a subdomain](https://forums.aws.amazon.com/message.jspa?messageID=718365).
## 5. Helpful Links to speed up research and evaluation
* [`CreateHostedZone` API Docs](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html), particularly the [`DelegationSetId`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html#Route53-CreateHostedZone-request-DelegationSetId) tag.
* Reusable delegation set API docs
* [`CreateReusableDelegationSet`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html)
* [`GetReusableDelegationSet`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSet.html)
* [`GetReusableDelegationSetLimit`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSetLimit.html) - max # of zones that can use a DS
* [`ListReusableDelegationSets`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListReusableDelegationSets.html)
* [`DeleteReusableDelegationSet`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteReusableDelegationSet.html)
* API docs for changing record sets:
* [`ChangeResourceRecordSets`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html)
* [`ListResourceRecordSets`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListResourceRecordSets.html)
## 6. Category
Networking & Content
## 7. Additional Context
There appear to be only two ways via the Route 53 API to associate a hosted zone with a reusable delegation set:
1. Create a new hosted zone, specifying a `DelegationSetId`.
1. Create a new reusable delegation set by specifying the optional `HostedZoneId` parameter when invoking `CreateReusableDelegationSet`. Doing so creates the delegation set from the current NS records for the zone, and has the side-effect of associating that zone with the delegation set. This also has the side-effect of not allowing the delegation set to be deleted until the original zone from which it was created gets deleted.
Because the API offers no way to associate an existing hosted zone with an existing reusable delegation set, the update behavior described would almost certainly require replacement. Moreover, all non-apex NS and SOA records and all other hosted zone properties would have to be copied from the current resource to the replacement resource.
Record set and record set groups can be created via CloudFormation, so any records in a CloudFormation-created hosted zone that are not created as part of a CloudFormation template would be considered drift. So either the mere presence of non-CloudFormation-created record sets should cause updates to fail, or the records would be subject to loss if an update that requires replacement were invoked. I suppose these cases are already considered in the implementation of the `Name` property, [updates of which require replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html#cfn-route53-hostedzone-name).
Contributor guide
Assessment
This issue has not been assessed yet.