Backport of [TF-38853] Validate provider versions in config match the lock file into v1.16 - #38977
Open
github-actions[bot] wants to merge 1 commit into
Open
Conversation
austinvalle
requested changes
Aug 5, 2026
austinvalle
left a comment
Member
There was a problem hiding this comment.
Looks like this backport PR needs to be fixed anyways (which I will do at some point), but we aren't planning on landing this change until v1.16.1
🛑
austinvalle
force-pushed
the
backport/arunatibm/TF-38853/radically-shining-guinea
branch
from
August 5, 2026 20:34
b3f13d2 to
225ee5e
Compare
austinvalle
force-pushed
the
backport/arunatibm/TF-38853/radically-shining-guinea
branch
from
August 5, 2026 20:36
225ee5e to
644249f
Compare
austinvalle
marked this pull request as ready for review
August 5, 2026 21:03
Member
|
Marking this as ready to signify that the backport was completely successfully manually + verified by me (I just used the squashed commit from This PR still should not be merged until |
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.
Backport
This PR is auto-generated from #38829 to be assessed for backporting due to the inclusion of the label 1.16-backport.
The below text is copied from the body of the original PR.
Description
Fixes issue TF-38853
For a Stack configuration, if there is a discrepancy between the provider version declared in the component configuration and the the version in the
.terraform.lock.hcl, the Stack will execute deployment runs. This is a problem since we have a split between the preferred version and the locked version and leads to confusion and inconsistency.What is desired is that when the configured version and locked version differ, an error diagnostic must be generated. This will allow the practitioner to inspect, decide and fix the provider versions and then recreate the lock before executing a deployment run.
To recreate this issue, edit the provider version in the configuration file but do not regenerate the lock file. Then create a stack with this configuration. The deployment run will complete successfully.
The bulk of the functional changes are in these files, and the remaining are to fix test inputs because the new validations will fail.
Testing
Created a mismatch between the lock and the configuration and ran
$ terraform stacks validateand we see the validation errors in the command response.Snippet of the configuration with the provider declarations
Snippet from the lock file
Target Release
Next upcoming minor release
1.17.x
Rollback Plan
Changes to Security Controls
N/A
CHANGELOG entry
Overview of commits
80b0875
b9d1ffe
5dfbe08
3638b17
b041bcb
77f4c56
ae3a506
6539b7f
3c0d287
09a2fa3
81e27bd
9532585
6477d85
d5f083d
7bc1bff
1afdd83
850f031