Go scaffold and pkg/godaddy/ DNS client #3
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
Lineage
Depends on #1 (docs foundation, merged). First code ticket for
project-godaddy-tofu.Repo
ldraney/godaddy-tofuUser Story
As a provider developer
I want a scaffolded Go module with a working GoDaddy API client
So that the DNS client methods are proven against the live API before provider wiring
Context
Go module with Terraform Plugin Framework dependency. The
pkg/godaddy/client package wraps the GoDaddy REST API directly usingnet/httpandsso-keyauth. DNS endpoints are P0 — the client must cover all 6 DNS record endpoints fromdocs/dns-endpoints.md.The provider skeleton (
main.go,provider.go) should compile and register with Tofu but doesn't need working resources yet — that's a follow-up issue.Reference:
docs/swagger_domains.jsonfor endpoint contracts,docs/auth.mdfor auth format.File Targets
go.mod/go.sum— Go module withhashicorp/terraform-plugin-frameworkdependencymain.go— provider entry point (plugin serving)provider.go— provider struct withapi_keyandapi_secretconfig, resource/data source registration (stubs)pkg/godaddy/client.go—Clientstruct,NewClient(apiKey, apiSecret string, opts ...Option),sso-keyauth header, base URL config,WithBaseURLoptionpkg/godaddy/dns.go—DNSRecordstruct, all 6 DNS methods:GetRecords(domain, recordType, name string) ([]DNSRecord, error)ReplaceRecords(domain, recordType, name string, records []DNSRecord) errorDeleteRecords(domain, recordType, name string) errorReplaceAllRecords(domain string, records []DNSRecord) errorReplaceRecordsByType(domain, recordType string, records []DNSRecord) errorAddRecords(domain string, records []DNSRecord) errorpkg/godaddy/domains.go—Domainstruct, read-only domain methods:ListDomains() ([]Domain, error)GetDomain(domain string) (*Domain, error)Feature Flag
None.
Acceptance Criteria
go build .compiles without errorsgo vet ./...passespkg/godaddy.NewClient("key", "secret")instantiates without errorListDomains()andGetDomain()exist with correct signaturesterraform-plugin-framework(compiles,tofu initdoesn't error)Test Expectations
go build ./...succeedsgo vet ./...cleanConstraints
net/httpfor HTTP client (no external HTTP library)encoding/jsonstruct tagsChecklist
Related
project-godaddy-tofudocs/dns-endpoints.md— endpoint contractdocs/auth.md— auth formatScope Review: NEEDS_REFINEMENT
Review note:
review-1424-2026-06-13Issue body is fully complete against the feature template -- all 12 sections present, file targets verified against existing docs, acceptance criteria are agent-testable. Two traceability gaps remain:
story-godaddy-tofu-dns-iacdoes not exist in pal-e-docs (user-stories table references it but the note is missing)arch-godaddy-tofudoes not exist in pal-e-docs (board item carriesarch:godaddy-tofulabel but no backing note)Scope Review: READY
Review note:
review-1424-2026-06-13-r2Re-review after previous NEEDS_REFINEMENT. Both scope items resolved: story note
story-godaddy-tofu-dns-iacand all three architecture notes (arch-domain-godaddy-tofu,arch-dataflow-godaddy-tofu,arch-deployment-godaddy-tofu) now exist in pal-e-docs. Template complete, traceability triangle satisfied, file targets verified against greenfield repo. Ready to move to next_up.