The recently added Route53 hosted zone nuke implementation https://github.com/gruntwork-io/cloud-nuke/pull/646 allows to delete a Route53 Hosted zone, though, it can only nuke an empty zone - zone that only contains 2 "required" NS & SOA entries created by default and no others. If there is any custom DNS record set created in the zone, the nuke of the zone fails with:
ERROR [Failed] /hostedzone/Z1234567890: HostedZoneNotEmpty: The specified hosted zone contains non-required resource record sets and so cannot be deleted.
status code: 400, request id: e0ed1ea1-2d48-4e4e-839c-3b5108b1f99f
The reason is, that all the record sets other than NS and SOA must be deleted first, prior attempting to delete the zone.
ATM cloud-nuke does not allow to delete hosted zone's record-sets.
The recently added Route53 hosted zone nuke implementation https://github.com/gruntwork-io/cloud-nuke/pull/646 allows to delete a Route53 Hosted zone, though, it can only nuke an empty zone - zone that only contains 2 "required"
NS
&SOA
entries created by default and no others. If there is any custom DNS record set created in the zone, the nuke of the zone fails with:The reason is, that all the record sets other than
NS
andSOA
must be deleted first, prior attempting to delete the zone.ATM
cloud-nuke
does not allow to delete hosted zone's record-sets.