Open
Description
Describe the bug
When running terragrunt plan on a unit that holds both a terragrunt.hcl and .terraform.lock.hcl file, the lock file is modified. My underdstanding from this is that terragrunt should respect the lock file as being provided as part of the unit (and checked into git).
Steps To Reproduce
- Check lock file in a freshly deployed unit (no .terragrunt-cache)
For example, it will hold a constraint like this:
provider "registry.opentofu.org/hashicorp/azuread" {
version = "3.3.0"
constraints = ">= 2.35.0"
hashes = [
...
- Run a plan
terragrunt plan --terragrunt-non-interactive -out=planfile -lock=false
- Check the lock file again
provider "registry.opentofu.org/hashicorp/azuread" {
version = "3.3.0"
constraints = "3.3.0"
hashes = [
...
Check the changed constraint.
In this particular example we see that the actual version doesn't change, however in other examples this is the case. Causing issues obviously.
Expected behavior
The lock-file should be respected and be read-only.
Versions
- Terragrunt version: v0.72.6
- OpenTofu version: v1.9.0
- MacOS