Skip to content

Cross-driver IaC ownership-tagging convention (phase 2 of gocodealone-dns import) #779

Closed

Description

@intel352

Context

gocodealone-dns (private) now imports DigitalOcean DNS state via GH Action. To detect cross-repo IaC conflicts (e.g. one repo asserts ownership of a record another repo also manages), we need a uniform "who owns this resource" marker convention across IaC drivers.

DigitalOcean DNS records have no native tagging facility, so we adopted a TXT record convention:

_dns-managed-by.<domain>.   IN   TXT   "<owner>"

This issue tracks generalizing the convention across all IaC drivers in the workflow plugin ecosystem.

Proposed convention by resource class

Resource class Mechanism Examples
DNS records TXT _dns-managed-by.<zone> digitalocean, hover, cloudflare, namecheap
Natively-taggable resources Tag managed-by:<owner> DO Droplets/Spaces/Volumes/K8s; AWS EC2/S3/EKS; GCP/Azure equivalents
Untagged + no TXT analogue Naming prefix mgd-<owner>-<resource> rare edge cases

Scope

  1. Add OwnershipTagger interface to plugin/external/sdk (or extend existing IaC interfaces)
  2. Each IaC driver implements:
    • Read: GetOwner(resource) (owner string, source string, error)
    • Write: SetOwner(resource, owner string) error (called on first apply if not already set)
  3. wfctl plugin apply reads ownership before mutating; refuses if owner mismatches caller (unless --force)
  4. wfctl plugin enumerate-owners --owner <name> lists all resources tagged for owner

Drivers to update

  • workflow-plugin-digitalocean (DNS via TXT; everything else via Tags)
  • workflow-plugin-aws (Tags everywhere)
  • workflow-plugin-azure (Tags everywhere)
  • workflow-plugin-gcp (Labels everywhere)
  • workflow-plugin-hover (DNS via TXT)
  • workflow-plugin-cloudflare (DNS via TXT)
  • workflow-plugin-namecheap (DNS via TXT)

Reference

Activity

  1. intel352 commented on Jun 1, 2026

    @intel352
    ContributorAuthor

    Audit result: still relevant.

    Verified against latest origin/main: there is no OwnershipTagger, GetOwner, SetOwner, enumerate-owners, or _dns-managed-by implementation in workflow core/wfctl/plugin SDK. The request still matches the repository direction because ownership checks belong at the IaC plugin/wfctl mutation boundary and require a multi-driver cascade.

  2. intel352 commented on Jun 1, 2026

    @intel352
    ContributorAuthor

    Progress update while addressing this issue:

    • Verified latest workflow main now has DNS ownership enforcement through wfctl dns-policy and the _workflow-dns-policy.<zone> TXT convention. That supersedes the older per-record _dns-managed-by.<domain> proposal for DNS.
    • Opened PR docs: clarify DNS ownership policy #821 to document that current DNS ownership mechanism and narrow the issue scope.
    • Remaining scope is the generic cloud-resource side: natively taggable resources should converge on a provider-appropriate managed-by:<owner>/label convention, and wfctl/provider plugins still need a concrete ownership read/write/enumeration contract for those resources.

    I am leaving this issue open until that generic tag/label ownership pass is implemented across the provider plugins.

  3. intel352 commented on Jun 1, 2026

    @intel352
    ContributorAuthor

    Progress update:

    Leaving this issue open because the original scope is cross-driver. Remaining cascades still need evaluation/implementation for AWS, Azure, GCP, Hover, Cloudflare, and Namecheap ownership providers/conventions.

  4. added a commit that references this issue on Jun 2, 2026
  5. intel352 commented on Jun 2, 2026

    @intel352
    ContributorAuthor

    AWS cascade update for workflow#779:

    Remaining provider cascades for this issue still include Azure, GCP, Hover, Cloudflare, and Namecheap.

  6. intel352 commented on Jun 2, 2026

    @intel352
    ContributorAuthor

    Azure ownership cascade for this issue is complete.

    Completed:

    Verification:

    • Azure local: focused ownership/blob tests, GOWORK=off go test ./... -count=1, GOWORK=off go vet ./..., git diff --check.
    • Azure PR CI: CodeQL, Build & Test, typed-iac-engine-range, Analyze(actions), Strict Contract Validation all passed.
    • Azure post-merge main workflows and release workflow all passed.
    • Registry local validation and PR CI all passed.

    Remaining provider cascades still include GCP, Hover, Cloudflare, and Namecheap.

  7. intel352 commented on Jun 2, 2026

    @intel352
    ContributorAuthor

    GCP cascade completed.

    Follow-up release sweep from the GCP failure:

  8. intel352 commented on Jun 2, 2026

    @intel352
    ContributorAuthor

    Final remaining-provider audit for workflow#779:

    • Hover, Cloudflare, and Namecheap were rechecked against latest origin/main.
    • All three expose infra.dns through strict-contract ResourceDriver implementations, and current workflow core routes DNS ownership through wfctl dns-policy / _workflow-dns-policy.<zone> via dns/gate.DriverReader.
    • cmd/wfctl/dns_policy.go and dns/gate/gate.go explicitly document support for DO / CF / NC / Hover through IaCProvider.ResourceDriver("infra.dns"); no per-provider IaCProviderOwnership implementation is needed for these DNS-only ownership semantics.
    • Cloudflare and Namecheap have registrar/domain-transfer surfaces, but they are not natively taggable cloud resources and do not fit the workflow-owner tag/label contract shipped for DO/AWS/Azure/GCP. Adding ownership providers there would duplicate the DNS policy mechanism or invent an unsupported owner side channel.

    With DO, AWS, Azure, and GCP ownership providers released and registry-synced, and DNS providers covered by the shipped DNS policy mechanism, I consider this issue complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions