portfolio-app: drop the stale Phase-2 enable_branch_bypass hints and check the plan after gh-plumbing #509/#510

未关闭 适合新手
#23 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, terraform

调研方向

先阅读 docs/en/portfolio-app.md:59,然后查看 terraform/repos 中的 ruleset bypass(bypass_portfolio_app = true、actor_type = "Integration"),了解提示应该指向什么。编辑 terraform/portfolio-app/main.tf 中的注释、variables.tf 中 enable_branch_bypass 的描述,以及 terraform.example.tfvars 中被注释掉的行;变量透传保持不动。完成意味着这三处都不再提示 enable_branch_bypass = true,每一处都指明 ruleset bypass,并且记录一份来自 source scripts/portfolio-app-env.sh && terraform -chdir=terraform/portfolio-app init -upgrade && task tf:plan:portfolio-app 的 plan,显示只有 PORTFOLIO_APP_PRIVATE_KEY 的 in-place 更新,没有 replace 或 destroy。

由索引模型根据 Issue 内容生成。

描述

docs project-config

terraform/portfolio-app consumes github.com/nolte/gh-plumbing//terraform/portfolio-app?ref=develop. Two module changes landed on gh-plumbing develop on 2026-11-21 and reach this root module at the next terraform init -upgrade. Three local hints also describe a bypass path that no longer works for this setup.

1. Stale "Phase 2" hints

These spots describe flipping enable_branch_bypass = true as the next step:

  • terraform/portfolio-app/main.tf: comment "Flip to Phase 2 once every consumer repo has the App installed …"
  • terraform/portfolio-app/variables.tf: description of enable_branch_bypass ("Phase 2 toggle. Flip to true …")
  • terraform/portfolio-app/terraform.example.tfvars: # enable_branch_bypass = true

That path is not available here:

  • In user mode (user = var.owner), the module refuses enable_branch_bypass = true at plan time since nolte/gh-plumbing#499. GitHub documents push restrictions only for organisation-owned repositories.
  • In organisation mode it additionally needs the new input app_node_id since nolte/gh-plumbing#510.
  • docs/en/portfolio-app.md:59 already says the module's bypass path is unused here, and that the App bypass lives in terraform/repos rulesets (bypass_portfolio_app = true, actor_type = "Integration").

Change: point the three hints at the ruleset bypass in terraform/repos instead of enable_branch_bypass. Keep the variable passthrough as it is.

2. Check the plan after gh-plumbing #509

nolte/gh-plumbing#509 replaced the deprecated plaintext_value with value on the secret resources and raised the module's provider floor to ~> 6.12.

  • The local lockfile already pins provider 6.12.1, so init should resolve without a version change.
  • In user mode only github_actions_secret is affected. The new github_actions_organization_secret_repositories resource is organisation-mode only.
  • Expected, not verified: one in-place update per consumer repository for PORTFOLIO_APP_PRIVATE_KEY, with no replace and no change to the variable.

Check: source scripts/portfolio-app-env.sh && terraform -chdir=terraform/portfolio-app init -upgrade && task tf:plan:portfolio-app. Confirm the plan shows only those in-place secret updates, then apply.

Optional

Since nolte/gh-plumbing#510, app_slug is optional and no longer read by the module. TF_VAR_app_slug in scripts/portfolio-app-env.sh and the app_slug passthrough can stay. They are harmless and could be removed later.

Acceptance

  • None of the three files suggests enable_branch_bypass = true as a next step. Each names the ruleset bypass in terraform/repos.
  • A plan after init -upgrade is recorded in the PR. It shows no replace and no destroy.
主要语言
HCL
星标
0
派生
0
平均合并
23 分钟
30 天内合并 PR
3

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nolte/terraform-github-bootstrap 的其他 Issue

查看 nolte/terraform-github-bootstrap 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。