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
- Add
OwnershipTagger interface to plugin/external/sdk (or extend existing IaC interfaces)
- 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)
wfctl plugin apply reads ownership before mutating; refuses if owner mismatches caller (unless --force)
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
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:
This issue tracks generalizing the convention across all IaC drivers in the workflow plugin ecosystem.
Proposed convention by resource class
_dns-managed-by.<zone>managed-by:<owner>mgd-<owner>-<resource>Scope
OwnershipTaggerinterface toplugin/external/sdk(or extend existing IaC interfaces)GetOwner(resource) (owner string, source string, error)SetOwner(resource, owner string) error(called on firstapplyif not already set)wfctl plugin applyreads ownership before mutating; refuses if owner mismatches caller (unless--force)wfctl plugin enumerate-owners --owner <name>lists all resources tagged for ownerDrivers to update
Reference