Pin the AWS provider to ~> 6.64.0 and commit the lock file - #192
Merged
Conversation
|
Terraform plan in terraform No changes. Your infrastructure matches the configuration.✅ Plan applied in Apply Terraform changes on merge #45 |
6 tasks
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.
Closes #181.
This repository declared no
required_providersblock anywhere interraform/*.tf, so nothing constrainedhashicorp/aws, and.gitignoreignored the lock file. Every CI run installed whatever the newest AWS provider happened to be that day. Since this repository manages IAM -- users, groups, policies and the OIDC providers other repositories authenticate through -- an unreviewed provider upgrade lands on the account's access control.Changes
terraform/backend.tf-- added arequired_providersblock inside the existingterraform { }, pinninghashicorp/awsat~> 6.64.0. Three parts, not two:~> 6.64would allow every 6.x and would not fix this..gitignore-- removed*.terraform.lock.hcland its now-orphaned# Ignore lock fileheader. The.terraform/directory entries are untouched. The file also gains the trailing newline it was missing.terraform/.terraform.lock.hcl-- generated withterraform providers lock -platform=linux_amd64 -platform=windows_amd64and committed. Both platforms are needed because CI runs onubuntu-latestwhile local work is on Windows.Why 6.64.0 rather than the 6.62.0 named in the issue
The issue was written on 2026-08-30, when 6.62.0 was the latest release; 6.64.0 is the current latest. The most recent apply run here installed 6.63.0, and the most recent apply on hackforla/incubator installed 6.64.0. The issue asks for both repositories to be pinned to the same version so they cannot diverge against account 035866691871, and 6.64.0 is the higher of the two, so neither state ends up written by a provider newer than its own pin. hackforla/incubator#192 pins to the same version in the same pass.
Verification
terraform validatepasses andterraform fmt -checkis clean onbackend.tf. Both providers in the lock file carry twoh1:hashes, one per platform, and theawsentry recordsconstraints = "~> 6.64.0", which confirms the new block is read rather than the version merely resolved.The plan run on this PR is the real check -- it should still report "No changes. Your infrastructure matches the configuration." Any change appearing now is caused by the pin and needs to be understood before merging rather than applied.
The issue's last action item is post-merge and stays open until then: confirm the next plan run installs the pinned version rather than resolving a fresh one. That is also what settles the genuinely untested question of whether
dflook/terraform-plan@v1honours a committed lock file, since until now there was no committed lock file for it to honour.Note on
tlsThe lock file also pins
hashicorp/tls, which nothing constrains, and resolves it to 4.4.0. This is not a change to what CI was doing -- with no lock file it was already installing the latesttlson every run. Onlyawsgets arequired_providersconstraint.