feat(opentofu): source docs GitHub App key from Actions secret - #33
Merged
Conversation
Shared workflows CI passedValidation output (redacted, last 12000 characters) |
This was referenced Aug 30, 2026
Merged
xnoto
added a commit
to makeitworkcloud/tfroot-github
that referenced
this pull request
Aug 30, 2026
## Summary - extend the existing SOPS-backed `chart_updater_github_app_private_key` recipient list to the five OpenTofu caller roots: `tfroot-aws`, `tfroot-cloudflare`, `tfroot-gcp`, `tfroot-github`, `tfroot-libvirt` - **also fixes a pre-existing main breakage**: the `www_access_key_id` / `www_secret_access_key` lookups drifted from the actual SOPS key names (`www_aws_access_key_id` / `www_aws_secret_access_key`, matching the `onion_aws_*` naming), which failed every plan on `main` with `Invalid index` and blocked the post-#44 apply. The values never left `secrets/secrets.yaml`; only the `main.tf` references were wrong. No SOPS or secret-value changes. - no secret name (`name =`) changes, so existing Actions secrets are untouched ## Context This finishes the migration started in #42. The shared OpenTofu workflow's generated-docs commit path (makeitworkcloud/shared-workflows#33) now consumes `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` as an Actions secret, matching how `charts` already uses it, so each caller repository needs the secret provisioned. The chart updater GitHub App installation already covers the organization. Per `docs/chart-updater-github-app.md`, adding source repositories broadens private-key distribution and requires explicit review. Once this and the companion PRs merge and apply, the AWS Secrets Manager copy becomes genuinely unreferenced; removing the `github-actions-opentofu-docs` role is tracked in makeitworkcloud/tfroot-aws#32 (draft). ## Validation - PR CI plan is the validation authority; confirm it creates exactly five new `github_actions_secret.secrets` instances plus the already-pending `github_branch_protection.relaxed_protections["agent-knowledge"]` from #44, and modifies nothing else. - Reviewed the diff: no decrypted values or plaintext material included. ## Rollout Merge and let the environment-gated apply complete **before** merging the five caller PRs, so the Actions secret exists when callers start mapping it. Merge order: shared-workflows#33 first, then this PR, then the caller PRs.
xnoto
added a commit
to makeitworkcloud/tfroot-aws
that referenced
this pull request
Aug 30, 2026
## Summary - map the repository `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` Actions secret into the reusable OpenTofu workflow ## Context Completes the chart updater App key migration for this root. makeitworkcloud/shared-workflows#33 replaces the AWS OIDC + Secrets Manager docs-commit credential with this secret; makeitworkcloud/tfroot-github#45 provisions the secret to this repository. ## Merge order 1. makeitworkcloud/shared-workflows#33 2. makeitworkcloud/tfroot-github#45 (apply provisions the secret) 3. This PR CI on this PR calls the reusable workflow from `@main` and cannot pass until shared-workflows#33 merges; re-run checks after that lands. ## Validation - Reviewed the diff: one secret mapping added; no credentials or decrypted values included. - GitHub Actions checks are the validation authority after the dependency merges.
xnoto
added a commit
to makeitworkcloud/tfroot-cloudflare
that referenced
this pull request
Aug 30, 2026
## Summary - map the repository `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` Actions secret into the reusable OpenTofu workflow ## Context Completes the chart updater App key migration for this root. makeitworkcloud/shared-workflows#33 replaces the AWS OIDC + Secrets Manager docs-commit credential with this secret; makeitworkcloud/tfroot-github#45 provisions the secret to this repository. ## Merge order 1. makeitworkcloud/shared-workflows#33 2. makeitworkcloud/tfroot-github#45 (apply provisions the secret) 3. This PR CI on this PR calls the reusable workflow from `@main` and cannot pass until shared-workflows#33 merges; re-run checks after that lands. ## Validation - Reviewed the diff: one secret mapping added; no credentials or decrypted values included. - GitHub Actions checks are the validation authority after the dependency merges.
xnoto
added a commit
to makeitworkcloud/tfroot-gcp
that referenced
this pull request
Aug 30, 2026
## Summary - map the repository `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` Actions secret into the reusable OpenTofu workflow ## Context Completes the chart updater App key migration for this root. makeitworkcloud/shared-workflows#33 replaces the AWS OIDC + Secrets Manager docs-commit credential with this secret; makeitworkcloud/tfroot-github#45 provisions the secret to this repository. ## Merge order 1. makeitworkcloud/shared-workflows#33 2. makeitworkcloud/tfroot-github#45 (apply provisions the secret) 3. This PR CI on this PR calls the reusable workflow from `@main` and cannot pass until shared-workflows#33 merges; re-run checks after that lands. ## Validation - Reviewed the diff: one secret mapping added; no credentials or decrypted values included. - GitHub Actions checks are the validation authority after the dependency merges.
xnoto
added a commit
to makeitworkcloud/tfroot-github
that referenced
this pull request
Aug 30, 2026
## Summary - map the repository `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` Actions secret into the reusable OpenTofu workflow ## Context Completes the chart updater App key migration for this root. makeitworkcloud/shared-workflows#33 replaces the AWS OIDC + Secrets Manager docs-commit credential with this secret; #45 provisions the secret to this repository. ## Merge order 1. makeitworkcloud/shared-workflows#33 2. #45 (apply provisions the secret) 3. This PR CI on this PR calls the reusable workflow from `@main` and cannot pass until shared-workflows#33 merges; re-run checks after that lands. ## Validation - Reviewed the diff: one secret mapping added; no credentials or decrypted values included. - GitHub Actions checks are the validation authority after the dependency merges.
xnoto
added a commit
to makeitworkcloud/tfroot-libvirt
that referenced
this pull request
Aug 30, 2026
## Summary - map the repository `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` Actions secret into the reusable OpenTofu workflow alongside the existing SSH key mappings ## Context Completes the chart updater App key migration for this root. makeitworkcloud/shared-workflows#33 replaces the AWS OIDC + Secrets Manager docs-commit credential with this secret; makeitworkcloud/tfroot-github#45 provisions the secret to this repository. ## Merge order 1. makeitworkcloud/shared-workflows#33 2. makeitworkcloud/tfroot-github#45 (apply provisions the secret) 3. This PR CI on this PR calls the reusable workflow from `@main` and cannot pass until shared-workflows#33 merges; re-run checks after that lands. ## Validation - Reviewed the diff: one secret mapping added; no credentials or decrypted values included. - GitHub Actions checks are the validation authority after the dependency merges.
xnoto
added a commit
to makeitworkcloud/tfroot-aws
that referenced
this pull request
Aug 30, 2026
## Summary - remove the `github-actions-opentofu-docs` IAM role and its inline Secrets Manager read policy ## Context The shared OpenTofu workflow's generated-docs commit path no longer uses AWS: makeitworkcloud/shared-workflows#33 sources the chart updater GitHub App key from the caller-mapped `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` Actions secret, provisioned by makeitworkcloud/tfroot-github#45. After those land, nothing references this role or the legacy Secrets Manager copy, matching `tfroot-github/docs/chart-updater-github-app.md`. This mirrors #30, which removed the charts-facing role. The manually created Secrets Manager secret (`xnoto-s-chart-updater-github-app-private-key-*`) is intentionally not deleted here; per the runbook its deletion is a separate approved cleanup after the agreed rollback window. ## Rollout dependency Draft until all of the following have merged and applied: 1. makeitworkcloud/shared-workflows#33 2. makeitworkcloud/tfroot-github#45 3. Caller PRs: #31, tfroot-cloudflare#37, tfroot-gcp#5, tfroot-github#46, tfroot-libvirt#26 Destroying this role before then breaks generated-docs commits on same-repository PRs. ## Validation - GitHub Actions OpenTofu test and plan are required before merge; the plan must show only the role and policy destruction. - Reviewed the diff: file deletion only; no credentials or decrypted values included. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CHART_UPDATER_GITHUB_APP_PRIVATE_KEYto the reusable OpenTofu workflow secret contractgithub-actions-opentofu-docscredential and Secrets Manager steps from thetestjob;id-token: writeis no longer needed there (plan/apply keep OIDC for SOPS KMS)Context
Completes the migration started by tfroot-github#42 and tfroot-aws#30: the chart updater App key is canonically SOPS-backed in
tfroot-githuband distributed as a repository Actions secret (chartsalready consumes it this way). The AWS Secrets Manager copy is legacy pertfroot-github/docs/chart-updater-github-app.md; this removes the last workflow reference to it.Caller impact
CHART_UPDATER_GITHUB_APP_PRIVATE_KEYkeep automatic App-authored docs commits, which retrigger PR validation on the resulting SHA.testwith an explicit message whenREADME.mdis out of date, matching the pre-autofix behavior.tfroot-aws,tfroot-cloudflare,tfroot-gcp,tfroot-github, andtfroot-libvirt; they must merge after this PR so the secret input exists.Validation
No merge or workflow dispatch performed.