fix: add missing woodpecker_agent_secret to CI pipeline #73
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
forgejo_admin/pal-e-platform!73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "72-fix-add-missing-woodpecker-agent-secret"
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
TF_VAR_woodpecker_agent_secretenv mapping to bothplanandapplysteps in.woodpecker.yamltf_var_woodpecker_agent_secretalready created separatelyChanges
.woodpecker.yaml: AddedTF_VAR_woodpecker_agent_secret: from_secret: tf_var_woodpecker_agent_secrettoplanstep environment block.woodpecker.yaml: Added same mapping toapplystep environment blockTest Plan
woodpecker_agent_secretvariabletofu planshows no unexpected changes from this CI config changeReview Checklist
.woodpecker.yamltouched)from_secretpattern used by all other TF_VAR mappingsRelated
plan-pal-e-platform-- Phase 6 (CI Pipeline & Team Hardening)Tofu Plan Output
PR #73 Review
DOMAIN REVIEW
Change: Adds
TF_VAR_woodpecker_agent_secret: from_secret: tf_var_woodpecker_agent_secretto both theplanandapplysteps in.woodpecker.yaml.Correctness verified:
Terraform variable exists --
terraform/variables.tf:159declaresvariable "woodpecker_agent_secret"withtype = stringandsensitive = true. Properly marked sensitive.Variable is consumed --
terraform/main.tf:774andmain.tf:780usevar.woodpecker_agent_secretinset_sensitiveblocks for bothserver.env.WOODPECKER_AGENT_SECRETandagent.env.WOODPECKER_AGENT_SECRETin the Helm release.Salt pillar pipeline registered --
salt/pillar/secrets_registry.sls:55has thewoodpecker_agent_secretentry, confirming this secret flows through the full secrets pipeline (Salt pillar -> tfvars -> TF).Pattern consistency -- The
from_secretnaming convention (tf_var_woodpecker_agent_secret) matches the exact pattern used by all 15 other TF_VAR mappings in both steps. The placement is at the end of the environment block, afterTF_VAR_woodpecker_db_password, which is consistent.Both steps updated -- The mapping is added to both
plan(line 55-56) andapply(line 124-125) steps. This is correct --planneeds it to generate an accurate plan, andapplyneeds it to actually apply changes. Missing from either would be a bug.Root cause validated -- PR #68 introduced
var.woodpecker_agent_secretin Terraform but did not add the corresponding CI environment mapping. This PR correctly closes that gap. Without this fix, bothtofu planandtofu applywould prompt for the missing variable interactively, causing CI to hang or fail.No secrets in code -- The diff only adds
from_secretreferences. The actual secret value is stored as a Woodpecker repo secret (created via Woodpecker MCP, per PR description). No plaintext secrets committed.BLOCKERS
None.
NITS
None. This is a minimal, correctly-scoped fix.
SOP COMPLIANCE
72-fix-add-missing-woodpecker-agent-secretreferences issue #72)plan-pal-e-platform)Closes #72present in Related sectionfrom_secretreferences)tofu planoutput -- The PR body has aTest Plansection with checkboxes rather than a## tofu plan Outputsection. However, this repo has automated plan-on-PR via Woodpecker CI, so the plan output would be posted as a separate comment by the pipeline. Since this change is CI-config only (no Terraform changes), the plan output would show "No changes" which is expected. This is acceptable.Note on tofu plan: This
.woodpecker.yamlchange does not modify any Terraform resources. It only ensures the CI pipeline can pass thewoodpecker_agent_secretvariable totofu. The plan output will be identical to main -- no infrastructure drift from this change.PROCESS OBSERVATIONS
planandapplysteps (17from_secretentries each) is a maintenance burden. Every new TF variable requires updating both blocks. A YAML anchor (&tf-secrets/*tf-secrets) could DRY this up. Not a blocker for this PR -- worth tracking as a future improvement.VERDICT: APPROVED