Implement godaddy_dns_record resource CRUD #11
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
resource_dns_record.gowith full CRUD lifecycle using the Terraform Plugin Framework.User Story
As a platform operator, I want to manage GoDaddy DNS records via
tofu applyso that DNS configuration is version-controlled and reproducible.Context
The Go client (
pkg/godaddy/) is fully implemented and tested. The provider skeleton exists but returns empty resource/data source maps. This is the P0 resource that makes the provider usable.Lineage
Parent: none
Story: dns-iac
Repo
godaddy-tofu
Scope
resource_dns_record.goimplementingresource.Resourceinterfacedomain(string, required),type(string, required),name(string, required),data(string, required),ttl(int, optional, default 600),priority(int, optional),weight(int, optional),port(int, optional)client.ReplaceRecords(ctx, domain, type, name, []DNSRecord{...})client.GetRecords(ctx, domain, type, name)client.ReplaceRecords(ctx, domain, type, name, []DNSRecord{...})client.DeleteRecords(ctx, domain, type, name)provider.goResources() mapdomain:type:namecomposite IDFile Targets
resource_dns_record.go(new)provider.go(register resource)Feature Flag
None
Test Expectations
tofu plan/apply/destroyagainst live APIAcceptance Criteria
tofu planshows DNS record as a resource to createtofu applycreates a DNS record at GoDaddytofu planafter apply shows no difftofu destroyremoves the recordConstraints
domain:type:namesince GoDaddy has no record-level IDsChecklist
Related
Depends on: #3 (done), #4 (done)
Blocks: palinks #50, pal-e-platform terraform config
Scope Review: #11 + #12 (DNS Resource CRUD + Data Source)
Reviewed both issues together since they ship as one unit.
1. Scope Clarity and Actionability
#11 (resource CRUD): Excellent. Scope section specifies the exact interface to implement (
resource.Resource), all schema attributes with types and optionality, the client methods to call for each CRUD operation (GetRecords,ReplaceRecords,DeleteRecords), and the composite ID format (domain:type:name). A dev agent can implement this without asking questions.#12 (data source): Clear and appropriately scoped. Interface (
datasource.DataSource), schema with required/optional filters, client method (GetRecords), and output shape are all specified. Straightforward companion to #11.2. Acceptance Criteria Testability
#11: Five criteria, all manually testable with
tofu plan/apply/destroy. Import test is verifiable. These are appropriate for a first implementation -- acceptance test automation is explicitly deferred to #13.#12: Three criteria, testable via
tofu planagainst live API. Filter behavior is verifiable.3. File Targets
#11:
resource_dns_record.go(new) +provider.go(register). Correct and complete.#12:
data_source_dns_records.go(new) +provider.go(register). Correct.Both reference
provider.goregistration -- the existing code has empty return slices inResources()andDataSources()which are ready to receive entries.4. Dependencies
#3 (Go scaffold): Closed.
provider.goskeleton exists with auth, empty resource/data source maps, and client wiring viaresp.ResourceData/resp.DataSourceData. Confirmed in tree.#4 (Integration tests): Closed. Client methods are proven:
GetRecords(ctx, domain, type, name)-- returns[]DNSRecordReplaceRecords(ctx, domain, type, name, []DNSRecord)-- returnserrorDeleteRecords(ctx, domain, type, name)-- returnserrorAll three signatures match what #11 and #12 reference.
APIErrortype exists for error unwrapping per #11's checklist.#10 (QA nits): Open, but covers test-level fixes (
errors.Asconsistency, dead code). Does not affect the client API surface or provider skeleton. Not a blocker.5. Ambiguity Check
No blockers found. Two minor observations (non-blocking):
GoDaddy PUT semantics: #11's Constraints section correctly flags that the API uses PUT (replace-all) rather than POST. The existing
ReplaceRecordsmethod already handles this. A dev agent should be aware that creating a single record for a type/name replaces any existing records at that path -- this is inherent to the API and documented in the constraint. Good.Delete behavior: GoDaddy's DELETE endpoint for DNS records may return 422 for certain protected record types (e.g., NS at
@). The dev agent should handle this gracefully but this is implementation detail, not a scoping gap.Verdict: APPROVED
Both issues are well-structured, specify exact file targets and interfaces, reference proven client methods, and have all dependencies satisfied. Ready for development as a single PR.