Add admin_app_db_password to Makefile TF_SECRET_VARS (gates #304 apply) #314
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#314
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
Bug
Lineage
Discovered scope from operator-side
make tofu-applyattempt (2026-04-26 by Ava following Lucas's "do it" auth). PR #304 declaredadmin_app_db_passwordas a terraform variable. PR #308 added the GPG-encrypted entry to the Salt pillar. Neither updated the Makefile'sTF_SECRET_VARSlist, so the pillar key never renders intoterraform/secrets.auto.tfvars, causingmake tofu-validate-secretsto fail and gating any apply.Repo
forgejo_admin/pal-e-platform
What Broke
Running
make tofu-apply(ormake tofu-secretsthenmake tofu-validate-secrets) succeeds at writing the rendered tfvars but does NOT includeadmin_app_db_passwordbecause the Makefile'sTF_SECRET_VARSlist doesn't reference it. As a result, terraform plan/apply errors with "no value for required variableadmin_app_db_password".PR #308's QA (review-pr-308-2026-04-26) claimed "TF_SECRET_VARS at line 51 of Makefile already includes admin_app_db_password" — that claim was incorrect. Inspection of current main (as of 2026-04-27) confirms the variable is absent from the list.
Repro Steps
make tofu-secrets— succeeds, writes 17 vars (does NOT include admin_app_db_password)grep admin_app_db_password terraform/secrets.auto.tfvars— returns nothingcd terraform && tofu plan— errors on missing required variableExpected Behavior
After PR #304 (var declared) and PR #308 (pillar entry) both merged,
make tofu-secretsshould renderadmin_app_db_passwordintoterraform/secrets.auto.tfvars, allowingmake tofu-applyto proceed.Environment
TF_SECRET_VARS)salt/pillar/secrets/platform.sls(entry exists per #308)terraform/variables.tf(per #304)User Story
story:admin-row-crud — As the operator running
make tofu-applyto provision the admin_app Postgres role for westside-admin, I need the Makefile to render the password from the Salt pillar so the apply doesn't fail on the missing variable.Architecture
arch:salt
Context
Two-step gap that fell through the cracks:
TF_SECRET_VARSis the explicit allow-list filtering pillar keys into rendered tfvars. Adding a new TF variable backed by a pillar key requires updates in three places: variables.tf (PR #304 ✓), pillar (PR #308 ✓), Makefile allow-list (this PR).Worth a follow-up to either:
convention-secrets-pipeline(or similar)File Targets
Makefileline 46-54 (TF_SECRET_VARSdefinition) — appendadmin_app_db_passwordto the appropriate continuation lineAcceptance Criteria
admin_app_db_passwordlisted inTF_SECRET_VARSmake tofu-secretswrites the password intoterraform/secrets.auto.tfvarsmake tofu-validate-secretspassesmake tofu-applyproceeds without "no value for required variable" errorTest Expectations
make tofu-secrets && grep admin_app_db_password terraform/secrets.auto.tfvarsreturns the rendered linetofu plan -lock=false(in terraform/) shows the planned admin_app resources (Job + Secret) without variable errorsConstraints
TF_SECRET_VARS— preserve the existing alphabetical/grouping patternChecklist
make tofu-secretsconfirmed renderCloses #THISRelated
feedback_discovered_scope_always_tracked,feedback_verification_before_completionClosing — false alarm by Ava. Latest main DOES include admin_app_db_password in TF_SECRET_VARS (line 51). Earlier diagnosis was reading the Makefile from ~/pal-e-platform working tree which sits on the stale 290-payment-pipeline-observability branch. Lesson: always inspect target file from a worktree off latest main when validating CI/build scripts. Closing as not-a-bug.