chore: fix DNS terraform nits from PR #436 review #438
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-platform!438
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/dns-terraform-nits"
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?
Summary
Fixes three QA nits from the DNS terraform provider PR (#436) review.
Changes
"178.156.129.142"withmodule.hetzner_edge.server_ipv4in both A record resources, so the edge IP stays in sync with the Hetzner module output.dev_overrides.terraformrcin the validate step sotofu initskips the custom godaddy provider (not in any registry).TF_VAR_godaddy_api_keyandTF_VAR_godaddy_api_secretsecret env vars to the plan step.Test Plan
Review Checklist
Related Notes
None.
Related
PR #438 Review
Parent issue: #437
Base branch:
feat/dns-terraform-provider(notmain)Files changed:
.woodpecker/terraform.yaml,terraform/dns.tf,terraform/versions.tfDOMAIN REVIEW
Stack: Terraform/OpenTofu (HCL), Woodpecker CI (YAML)
terraform/dns.tf -- Hardcoded IP replaced with module output
This change is correct and well-motivated. Both
godaddy_dns_recordresources replace"178.156.129.142"withmodule.hetzner_edge.server_ipv4. Verified:module "hetzner_edge"interraform/main.tf(line 154)server_ipv4is declared interraform/modules/hetzner-edge/outputs.tf(line 1), sourced fromhcloud_server.edge.ipv4_addressNo issues here. Clean improvement.
terraform/versions.tf -- Comment on custom provider
Two-line comment explaining why the godaddy provider has no version pin. Accurate and helpful for future readers. No issues.
.woodpecker/terraform.yaml-- dev_overrides for validate stepThe PR adds a
.terraformrcwithdev_overridespointing"ldraney/godaddy"to"/dev/null"in the validate step. The intent is correct: skip registry download for a custom provider that is not published.Potential issue with
/dev/nullas dev_overrides path:dev_overridestells OpenTofu to load the provider binary from the specified local path. Duringtofu validate, OpenTofu attempts to load the provider plugin to fetch its schema. Pointing to/dev/nullmeans it will try to execute/dev/nullas the provider binary, which will fail because/dev/nullis not an executable. This could causetofu validateto error out with a plugin-not-found or execution failure.Recommended alternatives:
GetProviderSchemawith an empty schema)tofu init, consider whethertofu validatecan be skipped for the godaddy provider specifically, or run validate with-targetexclusionsThis needs verification -- if CI has already been tested with this pattern and it passes, this concern can be dismissed. But if not tested, this is a likely CI failure.
.woodpecker/terraform.yaml-- GoDaddy secret env vars in plan and apply stepsThe two new secret env vars (
TF_VAR_godaddy_api_key,TF_VAR_godaddy_api_secret) are added to both the plan and apply steps with correctfrom_secretreferences following the established naming convention (tf_var_godaddy_api_key,tf_var_godaddy_api_secret). Verified that:godaddy_api_keyandgodaddy_api_secretare declared interraform/variables.tf(lines 226-235) withsensitive = truefrom_secretnaming convention matches the existing pattern used by all other secrets in this fileThe secrets must be added to the Woodpecker repo settings before this CI will work -- this is an operational dependency, not a code issue.
BLOCKERS
None. All changes are configuration/infrastructure, not new functionality requiring test coverage. No secrets are committed (secrets are referenced via
from_secret, not hardcoded). No input validation concerns apply.One risk item (not a blocker but needs verification): The
/dev/nulldev_overrides path may causetofu validateto fail at runtime. If this has been tested in CI and passes, disregard. If not tested, it will likely break the validate step.NITS
Heredoc indentation in YAML: The
.terraformrcheredoc content inside the YAML block scalar will retain leading whitespace (8 spaces). HCL parsers generally tolerate leading whitespace, so this should work, but a cleaner approach would be to use a dedented heredoc (<<-'EOF') or to left-align the content. Minor style point.Missing newline: The
.terraformrcwritten bycatdoes not include a trailing newline afterEOF. Most shells handle this correctly, but it is worth noting.Secret ordering: The new godaddy secrets are appended after
TF_VAR_admin_app_db_passwordin both steps. Consider grouping them with a comment like# GoDaddy DNS providerfor readability, consistent with how other logical groups might be organized as this list grows.SOP COMPLIANCE
.envfiles, or credentials committedfrom_secret, never hardcodedPROCESS OBSERVATIONS
feat/dns-terraform-provider, notmain-- this is a stacked PR pattern. Make sure #436 merges first.VERDICT: APPROVED
All changes are correct and well-scoped. The
/dev/nulldev_overrides path is a risk worth verifying in CI, but it is not a code correctness blocker -- if it fails, the CI pipeline will surface the error immediately and it can be fixed forward. The core improvements (dynamic IP reference, CI secrets wiring) are clean.