Skip to content

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

@intel352

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions