Implement godaddy_domains data source #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Summary
Implement
data_source_domains.goto list and read domain details from GoDaddy. P1 priority.User Story
As a platform operator, I want to list my GoDaddy domains via
tofu planso I can discover and reference domain properties.Context
P1 priority — useful for discovery but not required for DNS record management. The client methods
ListDomainsandGetDomainare already implemented and tested.Lineage
Parent: none
Story: domain-iac
Repo
godaddy-tofu
Scope
data_source_domains.goimplementingdatasource.DataSourceinterfacedomainfilter for single lookupclient.ListDomains(ctx)orclient.GetDomain(ctx, domain)domainslist with domain_id, domain, status, expires, created_atprovider.goDataSources() mapFile Targets
data_source_domains.go(new)provider.go(register data source)Feature Flag
None
Test Expectations
data "godaddy_domains" "all" {}lists domainsAcceptance Criteria
Constraints
P1 — do after DNS resource and data source
Checklist
Related
Story: domain-iac
Lower priority than DNS resource/data source
Scope Review -- Dottie
Verdict: APPROVED
This ticket is clear, actionable, and ready for a dev agent.
1. Scope clarity
The scope section is well-defined: create
data_source_domains.go, implementdatasource.DataSource, wire it intoprovider.go. The schema, read logic, and output attributes are all specified. A dev agent can start coding immediately.2. Acceptance criteria -- testable?
Yes. All three criteria are testable:
ListDomainsreturning a non-empty listdomainfilter callingGetDomaindomain_id,domain,status,expires,created_atare non-emptyNote: the ticket defers acceptance tests to a separate issue (#13 covers DNS; a domains acceptance test issue would be needed separately). For this ticket, manual validation (
data "godaddy_domains" "all" {}) is sufficient.3. File targets
Specified and correct:
data_source_domains.go(new) -- confirmed this file does not exist yetprovider.go(modifyDataSources()to register) -- confirmedDataSources()currently returns an empty slice4. Dependencies satisfied?
Yes. Verified against
HEAD:pkg/godaddy/domains.gocontains bothListDomains(ctx)andGetDomain(ctx, domain)with correct signaturespkg/godaddy/domains_test.gohas passing integration tests for both methodsDomainstruct has all fields the ticket's output attributes reference (DomainID,Domain,Status,Expires,CreatedAt)provider.goalready imports thedatasourcepackage and has the emptyDataSources()method ready for registration5. Ambiguity check
No blockers found. Two minor observations (not blocking):
Domainstruct has many more fields than the five output attributes listed (e.g.,Locked,Privacy,RenewAuto,NameServers). A dev agent should expose the five listed attributes at minimum; exposing additional fields is a judgment call but not ambiguous.DomainIDfield isint64in Go but the ticket saysdomain_idin the output -- the dev agent should usetypes.Int64in the Terraform schema, which is the obvious mapping.Bottom line: Scope is tight, dependencies are met, file targets are accurate. Ready for implementation.