Skip to content

feat(scaffold): add terraform_extra_secrets input to reusable workflow#103

Merged
ishuar merged 1 commit intomainfrom
feat/support-extra-dynamic-secrets
May 6, 2026
Merged

feat(scaffold): add terraform_extra_secrets input to reusable workflow#103
ishuar merged 1 commit intomainfrom
feat/support-extra-dynamic-secrets

Conversation

@ishuar
Copy link
Copy Markdown
Owner

@ishuar ishuar commented May 6, 2026

What and why

Adds an optional terraform_extra_secrets secret to the reusable Terraform plan/apply workflow template so callers can expose arbitrary secrets to Terraform without changing the template each time.

  • Callers pass one KEY=VALUE per line (typically TF_VAR_* referencing caller secrets).
  • A new Set extra secrets as env vars step appends those lines to $GITHUB_ENV in both the plan and apply jobs, so Terraform picks them up as env vars.
  • Values that match registered GitHub Actions secrets remain masked in logs.
  • Step is skipped when the input is empty, so existing callers are unaffected.

Fixes #

Notes for reviewers

  • Only the reusable workflow template under internal/templates/files/github/ is changed; behavior for callers that don't set terraform_extra_secrets is identical to before.
  • The env-injection runs before plan/apply but after cache restore, matching the existing step ordering.

Adds an optional `terraform_extra_secrets` secret input to the reusable
Terraform plan/apply workflow template. Callers pass KEY=VALUE lines
(typically `TF_VAR_*` referencing caller secrets), which are appended to
$GITHUB_ENV in both the plan and apply jobs so Terraform picks them up
as env vars. Values matching registered secrets remain masked in logs.
@ishuar ishuar merged commit 1cfcd13 into main May 6, 2026
3 checks passed
@ishuar ishuar deleted the feat/support-extra-dynamic-secrets branch May 6, 2026 12:00
ishuar pushed a commit that referenced this pull request May 6, 2026
🤖 I have created a release *beep* *boop*
---


## [0.8.4](v0.8.3...v0.8.4)
(2026-05-06)


### ✨ Features

* **scaffold:** add terraform_extra_secrets input to reusable workflow
([#103](#103))
([1cfcd13](1cfcd13))


### 📦 Other Changes

* extract version line via grep in install success message
([#101](#101))
([7465753](7465753))
* **scaffold:** install tfskel via install.sh in reusable workflow
([#104](#104))
([3c19128](3c19128))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant