Fix Plugin Framework convention gaps (P0/P1) #31
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
Fix gaps identified by auditing godaddy-tofu against HashiCorp's scaffolding provider, terraform-plugin-framework source, and OpenTofu internals. These must be resolved before writing acceptance tests (#13).
User Story
As a provider developer, I want our provider to follow Plugin Framework conventions so that acceptance tests, debugging, and registry publishing work correctly.
Context
Audit compared our implementation against:
terraform-provider-scaffolding-framework(HashiCorp's official example)terraform-plugin-frameworkv1.19.0 sourceopentofuruntime internalsNine gaps found. P0/P1 items block acceptance tests and correct runtime behavior.
Lineage
Parent: none
Story: dns-iac
Blocks: #13 (acceptance tests)
Repo
godaddy-tofu
Scope
P0 fixes:
idattribute togodaddy_dns_recordresource — Computed,UseStateForUnknown()plan modifier, set todomain:type:namein Create. Many tools expect resources to haveidin state.New()to return factory — Change signature toNew(version string) func() provider.Providermatching scaffolding. Updatemain.goaccordingly.-debugflag tomain.go—flag.BoolVar(&debug, "debug", false, ...)withDebug: debuginServeOpts. Required for delve debugging.http.Clientwithhashicorp/go-retryablehttpfor automatic retry on 429/500/502/503. Tests haveretryOn429but the client itself doesn't.P1 fixes:
5. Add missing compile-time interface check —
var _ datasource.DataSourceWithConfigure = (*dnsRecordsDataSource)(nil)indata_source_dns_records.go.6. Add
terraform-plugin-testingto go.mod —go get github.com/hashicorp/terraform-plugin-testing@latest. Required for #13.File Targets
resource_dns_record.go(add id attribute)main.go(debug flag, New() refactor)provider.go(update New() call)pkg/godaddy/client.go(retry middleware)data_source_dns_records.go(interface check)go.mod/go.sum(new dependencies)Feature Flag
None
Test Expectations
go build ./...passesgo vet ./...passespkg/godaddy/tests still passmain.goaccepts-debugflag without errorAcceptance Criteria
idattributeNew(version)returnsfunc() provider.Provider-debugflag wired up in main.godnsRecordsDataSourcehas compile-time interface checkterraform-plugin-testingin go.modConstraints
Checklist
Related
Blocks: #13 (acceptance tests)
Informed by: audit of terraform-plugin-framework, scaffolding provider, OpenTofu source
Scope Review: NEEDS_REFINEMENT
Review note:
review-1464-2026-06-14Issue is well-scoped with all template sections present, all 6 file targets verified against the codebase, and all acceptance criteria are agent-verifiable. Single traceability gap found:
[SCOPE]Thearch:godaddy-tofulabel is present on the board item but no backing architecture note (arch-godaddy-tofu) exists in pal-e-docs. Create the architecture note to close the traceability triangle.Scope Review: READY
Review note:
review-1464-2026-06-14bAll template sections present, traceability complete, file targets verified against code. Previous review (
review-1464-2026-06-14) incorrectly flaggedarch-godaddy-tofuas missing -- the note exists (ID 1971, type: architecture, tags: architecture,active). No scope issues found. Ready for implementation.