GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: add script to bump bundled terraform by coder[bot] · Pull Request #31463 · coder/coder

Conversation

@coder

@coder coder Bot commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Part 1 of 2 for automating Terraform bumps. This PR adds the bump script. #31461 is stacked on top and adds the weekly workflow that runs it. Today these bumps are done by hand (#30516, #31301, #31438 and their backports).

scripts/update_terraform_version.sh [--skip-fixtures] <version>

Run from the repo root. It updates every file that pins the bundled Terraform version. Files a branch doesn't have are skipped, so the same script works on main and on older release branches:

  • provisioner/terraform/install.go: TerraformVersion. maxTerraformVersion changes only on a minor/major bump (it moves to X.Y.9).
  • provisioner/terraform/terraform_SHA256SUMS (from fix: verify bundled terraform against a checksum file in the Coder repo #31600), when the branch has it: replaced with the verified SHA256SUMS. scripts/Dockerfile.base and install.sh read the version and checksums from that file, so neither is edited.
  • Otherwise (older branches): install.sh and scripts/Dockerfile.base are edited directly, as before.
  • dogfood/coder/Dockerfile, airgap docs (docs/install/airgap.md or docs/install/prepare/airgap.md), .github/actions/setup-tf/action.yaml, testdata/{,resources/}version.txt
  • mise.toml, mise.lock (per-platform checksums), flake.nix (per-platform SRI hashes, old and new layouts)
  • provisioner/terraform/testdata/generation.sha1: re-fingerprinted with generate.sh --if-needed using the new binary

Every checksum comes from terraform_<v>_SHA256SUMS, and the script fails unless that file carries a valid signature from HashiCorp's release key (C874 011F 0AB4 0511 0D02 1055 3436 5D94 72D7 468F). It refuses downgrades and fails if a touched file still points at another release, or if a branch that pins TERRAFORM_VERSION in install.sh didn't end up on the new version. It doesn't source lib.sh, so CI can run main's copy against a release branch checkout.

Testing

Run in a dogfood workspace:

  • main, 1.16.7 to 1.17.1: byte-identical to fix: bump bundled terraform to 1.17.1 #31438, including maxTerraformVersion and generation.sha1.
  • release/2.38, 1.16.7 to 1.17.1: byte-identical to fix: bump bundled terraform to 1.17.1 (backport 2.38) #31441.
  • release/2.29 (1.16.6 to 1.16.7) and release/2.34, release/2.36 (to 1.17.1): same file sets as the earlier manual backports (fix: bump bundled terraform to 1.16.6 for 2.29 #30555, fix: bump bundled terraform to 1.16.6 for 2.34 #30554, fix: bump bundled terraform to 1.16.6 for 2.36 #30553).
  • Rerunning on an already-bumped tree makes no changes. Downgrades, unknown versions and bad flags fail with a clear error.
  • Checksum-file layout (fix: verify bundled terraform against a checksum file in the Coder repo #31600 head, 1.16.7 to 1.17.1, --skip-fixtures): terraform_SHA256SUMS is byte-identical to HashiCorp's signed file, install.sh and Dockerfile.base are untouched, the new TestTerraformChecksumFileMatchesVersion passes, and mise.toml, mise.lock, flake.nix, the airgap doc and the install.go versions are byte-identical to fix: bump bundled terraform to 1.17.1 #31438. Rerunning changes nothing.
  • Old layout (main, 1.16.7 to 1.17.1, --skip-fixtures): output is byte-identical to the previous revision of this script.
  • shellcheck (v0.10.0) and shfmt -d (v3.12.0) are clean on the updated script.
  • make lint/shellcheck fmt/shfmt lint/emdash lint/typos pass.

How #31600, #31463 and #31461 fit together

  • fix: verify bundled terraform against a checksum file in the Coder repo #31600 makes provisioner/terraform/terraform_SHA256SUMS (a verbatim copy of HashiCorp's signed file) the one place the bundled Terraform checksums live. Dockerfile.base reads it, and install.sh downloads it from the Coder repo at install time.
  • chore: add script to bump bundled terraform #31463 adds scripts/update_terraform_version.sh. On branches with the checksum file it just replaces that file. On older branches it edits install.sh and Dockerfile.base directly.
  • ci: add weekly workflow to bump bundled terraform #31461 (stacked on chore: add script to bump bundled terraform #31463) runs the script weekly for main and the supported release branches. It needed no changes for the checksum file.

None of the three touch the same files, and merging all three onto main is conflict-free. On that combined tree, the bump script took 1.16.7 to 1.17.1 by replacing the checksum file, the new Go test passes, and actionlint and shellcheck pass. They can merge in any order. Merge #31461 after #31463, retargeted to main.

Opened by Superblink on behalf of @droopy4096.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coder coder Bot assigned droopy4096 Oct 28, 2026
@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Oct 28, 2026
@coder coder Bot mentioned this pull request Oct 28, 2026
ci: add weekly workflow to bump bundled terraform #31461
Draft
@droopy4096
droopy4096 added this pull request to stack #31482 October 29, 2026 13:56
@coder coder Bot mentioned this pull request Oct 30, 2026
fix: verify bundled terraform against a checksum file in the Coder repo #31600
Open
@droopy4096
droopy4096 marked this pull request as draft November 2, 2026 14:03
coder Bot added 3 commits November 2, 2026 07:11
@coder
chore: add script to bump bundled terraform
eaa78f2
scripts/update_terraform_version.sh updates every file that pins the bundled Terraform version, using GPG-verified HashiCorp checksums, and regenerates the fixture fingerprint. It works on main and on older release branches.
@coder
chore: bump terraform via the SHA256SUMS file when the branch has it
f77a3c1
On branches with provisioner/terraform/terraform_SHA256SUMS (#31600),
replace it with the verified SHA256SUMS and regenerate install.sh with
the branch's scripts/gen_install_sh_terraform.sh, instead of editing
install.sh and scripts/Dockerfile.base. Branches without it keep the
existing behavior. Also check that install.sh ends up on the new
version.
@coder
chore: leave the install.go note to the checksum file change
daf6444
The NOTE above TerraformVersion is rewritten by #31600, which now points at
this script, so drop the line added here to avoid a conflict.
@droopy4096
droopy4096 force-pushed the ci/terraform-bump-script branch from ffb7b24 to daf6444 Compare November 2, 2026 14:11
@droopy4096
droopy4096 marked this pull request as ready for review November 2, 2026 14:37
@coder
chore: stop regenerating install.sh in the terraform bump script
f86676e
install.sh now reads the Terraform version and checksums from
terraform_SHA256SUMS at install time (#31600), so on branches with that
file the script only replaces it. The install.sh version check now only
applies to branches that still pin TERRAFORM_VERSION.
@droopy4096
droopy4096 marked this pull request as draft November 2, 2026 15:01
@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

ENT-246

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@droopy4096
Merge branch 'main' into ci/terraform-bump-script
8eb96e4
@droopy4096
droopy4096 temporarily deployed to main November 10, 2026 21:37 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
main — 8eb96e48 Deployed Nov 10, 2026 by droopy4096 via cla #253734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@droopy4096 droopy4096

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@droopy4096
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.