Introduction
When running terraform plan, you may encounter a checksum error when Terraform attempts to install version 2.2.0 of the hashicorp/local provider.
Problem
During a terraform plan execution, you may receive the following error message indicating an incorrect checksum for the provider archive.
Error: Failed to install provider Error while installing hashicorp/local v2.2.0: archive has incorrect checksum zh:507776b1e1901fdd6450a88298fc87a27a508e0c01405c7e8e8f2037d5963afe (expected zh:f427480d3ec953434eccf21544b0b2be63595634e4e79a53575ceb892f22230d)
Cause
The v2.2.0 release of the hashicorp/local provider contained release assets with incorrect checksums. This issue was corrected in the subsequent v2.2.1 release.
Solution
To resolve this issue, update your Terraform configuration to require at least version 2.2.1 of the local provider. This ensures Terraform downloads the corrected release asset.
terraform {
required_providers {
local = {
source = "hashicorp/local"
version = "2.2.1"
}
}
}Additional Information
For more details, refer to the official release notes for the corrected version.