Repository navigation
fix(dns plugin): refuse ambiguous zones and add --vpc - #474
Merged
Merged
Conversation
Private zones can share a domain: every VPC's default zone is datum.internal. The zone and record commands took the first zone matching the domain, so in a project with two VPCs a record write could land in the other VPC's zone. The commands now refuse a domain that matches more than one zone and list the candidates with the VPCs that use them. --vpc picks the zone a VPC resolves, through its resolver context's default zone and its zone associations. A zone's object name still selects it directly.
Next-step hints and fixes now name a private zone by its object name, so the command they suggest does not hit the ambiguity error. Zones and resolver contexts being deleted no longer make a domain or VPC look ambiguous. --vpc on a public zone says so, the ambiguity list marks public zones and zones whose VPC could not be read, and a project whose contexts do not yet record their VPC gets an error that says that. zone create no longer counts private zones as holding a public domain.
Without --vpc, a private zone being deleted no longer drops out of the match, so a write cannot fall through to another VPC's zone. A typed argument now matches zones by domain and by object name together, so a dotted object name cannot shadow another zone's domain. --vpc now resolves the VPC by name to its network UID and matches it against each resolver context's immutable consumerID instead of a mutable label, and only accepted zone associations count. A public zone that shares its domain with a private zone is named by object in suggested commands. Deleting a private zone asks for its object name, and prompts name the zone object. The CLI guide documents --vpc.
scotwells
force-pushed
the
fix/cli-ambiguous-zone
branch
from
November 12, 2026 00:17
15c3375 to
af9e4d1
Compare
scotwells
marked this pull request as ready for review
November 12, 2026 00:34
kevwilliams
approved these changes
Nov 12, 2026
kevwilliams
left a comment
Contributor
There was a problem hiding this comment.
Verified --vpc matches the projectUID/networkUID consumerID network services writes, uses only v0.14.0 API fields, and merges cleanly after #522.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Scot Schuchert-Wells · project thread
Summary
Private zones can share a domain. Every VPC's default zone is
datum.internal. Until now, thedatumctl dnszone and record commands quietly used the first zone that matched a domain. In a project with more than one VPC, a record could be written to another VPC's zone.With this change:
--vpc <name>flag picks the zone that VPC resolves: its default zone, or a zone attached to it and accepted. The VPC is matched by its identity, not by a label that can be edited.--vpc.Related: datum-cloud/enhancements#921, #419
Test plan
datum.internal(refused without--vpc, right zone with it), accepted versus pending associations, labels that don't match the VPC, an unknown VPC, object name with and without a mismatched--vpc, a private zone being deleted, a public zone being deleted, an object name colliding with a domain, a public and a private zone sharing a domain,--vpcon a public zone, and private zone delete confirmation.Generated by Claude Code