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 #1079
The purpose of the lock files is to have tofu versions part of the version control to be able to discuss versions upgrades in PRs. I think it makes sense to have the lock files there.
The source of the problem we have is that we don't specify/lock version of source modules in our modules:
keycloak-benchmark/provision/opentofu/modules/aws/accelerator/main.tf
Line 59 in 5061f0e
This means tofu will always pick newest release and therefore load all new constraints from it.
There are more solutions to this:
tofu init -upgrade
in all modules - or at least in one that is failing.tofu init -upgrade
in our scripts or have it configured globally in some env var. The problem here is that we can introduce some incompatibility by using a newer version of some provider, likeaws
, prematurely when some module is not yet compatible with it. Relaxed version of this could be to ignore the versions only for aws provider (the error happened both times with aws), the disadvantage is that tofu does not support this and we would need to manually change lock file by removing version line (this can be easily broken if someone commits the file after tofu init).I would vote for 1. and this PR is updating the versions. However, I am open also to solution 3 but the disadvantage I see is that we can get errors from our nightly run and it could be hard to track from where the error comes from if there is some incompatibility by using older module for example, for aws lambda.