Skip to content

feat: add --zone|-z flag to plan and apply for single-zone targeting - #59

Merged
cl8dep merged 1 commit into
mainfrom
feat/zone-filter-flag
Apr 29, 2026
Merged

feat: add --zone|-z flag to plan and apply for single-zone targeting#59
cl8dep merged 1 commit into
mainfrom
feat/zone-filter-flag

Conversation

@cl8dep

@cl8dep cl8dep commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #58

Adds -z|--zone <ZONE> to both plan and apply (via PlanSettings, which ApplySettings inherits). When provided, only the specified zone is processed and only its source/target providers run preflight checks — all other zones and providers are skipped.

Usage

# Plan only one zone
dns-sync plan -c config.yaml --zone example.com.

# Apply only one zone without confirmation
dns-sync apply -c config.yaml --zone example.com. --yes

# Zone not in config → clear error, exit 1
dns-sync plan -c config.yaml --zone unknown.com.
# ✗ Zone 'unknown.com.' not found in config.

Test plan

  • plan --zone example.com. → only that zone is planned, preflight skips other providers
  • apply --zone example.com. --yes → only that zone is applied
  • plan --zone nonexistent.com. → exit 1 with error message
  • plan without --zone → all zones processed as before (no regression)
  • dotnet test passes (188 tests)

When --zone is set, only the specified zone is processed and only its
source/target providers run preflight checks. All other zones and
providers are skipped, reducing unnecessary network calls.

Closes #58
@cl8dep cl8dep added this to the v0.6.0 — GitOps Complete milestone Apr 29, 2026
@cl8dep cl8dep added feature New feature or capability dx Developer experience improvement labels Apr 29, 2026
@cl8dep
cl8dep merged commit d0ef36b into main Apr 29, 2026
1 check passed
@cl8dep
cl8dep deleted the feat/zone-filter-flag branch April 29, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dx Developer experience improvement feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --zone|-z flag to plan and apply to target a single zone

1 participant