
OPERATIONAL DEFECT DATABASE
...


...

### Terraform Version ```shell Terraform v1.13.3 on darwin_arm64 ``` ### Terraform Configuration Files `versions.tf` ```terraform terraform { required_providers { dns = { source = "hashicorp/dns" version = "~> 3.4" } } } ``` `tests/versions.tf` ```terraform terraform { required_providers { vault = { source = "hashicorp/vault" version = "~> 5.3" } } } ``` `tests/test.tftest.hcl` ```terraform run "test" { module { source = "./tests" } } ``` ### Debug Output N/A ### Expected Behavior Checksums for both `hashicorp/dns` (required by the root Terraform module) and `hashicorp/vault` (required by the `tests` Terraform module, which itself is required by `tests/test.tftest.hcl`) should be recorded in `.terraform.lock.hcl`, so that `terraform init -lockfile=readonly` can install the locked provider versions required by both `terraform plan` and `terraform test` commands ### Actual Behavior Only the checksum for `hashicorp/dns` is recorded in `.terraform.lock.hcl`, causing `terraform init -lockfile=readonly` to fail when it tries to add `hashicorp/vault` to `.terraform.lock.hcl`, since `terraform init` respects the providers required by modules in `tests/test.tftest.hcl`, but `terraform providers lock` does not ### Steps to Reproduce 1. `terraform providers lock` 2. `terraform init -lockfile=readonly` ### Additional Context _No response_ ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.