Files
floci/docs
Allen SanbornandPriamo Germosen f41f794337 fix(cloudmap): create the Route 53 hosted zone behind a DNS namespace (#7042)
* fix(cloudmap): create the Route 53 hosted zone behind a DNS namespace

Private and public DNS namespaces reported a random HostedZoneId that no
Route 53 zone backed. They now create a real zone (private with the
namespace VPC and region, or public) via Route53Service, and DeleteNamespace
deletes it; a zone holding user records refuses with HostedZoneNotEmpty and
the namespace is kept.

A private zone now covers the namespace's names, and the Route 53 DNS source
answers NXDOMAIN for names it has no record for. EmbeddedDnsServer took the
first present answer across sources, so bean order could hide Cloud Map
instances. An NXDOMAIN from one source no longer wins over another source's
real answer.

Reset: zones and namespaces live in separate stores; Route53Service.clear()
only drops in-memory counters, so no Cloud Map reset hook was added.

* test(cloudmap): select the user's zone now that namespaces own a real one

A private DNS namespace now creates a real Route 53 hosted zone, as AWS
does, so the compat projects hold two zones named floci-compat.internal:
the namespace's private zone and the public aws_route53_zone. The bats
lookups took the first zone by name, which picked the namespace zone
whenever its id sorted first, so the record and tag assertions read the
wrong zone. They now select the public zone.

The CloudFormation test pinned the namespace HostedZoneId to 14
characters, the length of Cloud Map's old placeholder. The id now comes
from Route 53, which, like AWS, does not use a fixed length; the test
checks for a bare Z-prefixed id instead.

* fix(dns): let a record source with records win over another's NODATA

Two sources can own one zone (a Cloud Map namespace and its Route 53
zone). An empty NOERROR from the first consulted source was returned
before the other was asked, so a TXT record in the zone hid Cloud Map's
A record at the same name. Empty answers are now fallbacks, an existing
name preferred over NXDOMAIN.

* fix(cloudmap): log a namespace zone that was already deleted

* docs(cloudmap): describe the real hosted zone in the operations table

* test(dns): pin how record sources combine REFUSED and negative answers

Another source's records now beat a REFUSED, and REFUSED beats NXDOMAIN
in either source order; nothing pinned either, so returning REFUSED
immediately went unnoticed. Also pin, as current behaviour, that a plain
NODATA beats an NXDOMAIN carrying an SOA authority.

The packet test now deletes the TXT records it adds to the namespace's
hosted zone, so the zone is left deletable.

---------

Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-10-30 23:14:37 -04:00
..
2026-03-15 17:43:56 -05:00