terraform install_error ai_generated true

Error: Failed to install provider: checksum mismatch

ID: terraform/terraform-init-provider-checksum-mismatch

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
1Evidence
2023-02-28First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
Terraform v1.1+ active
Provider registry active

Root Cause

The downloaded provider plugin's checksum does not match the one recorded in the .terraform.lock.hcl file.

generic

中文

下载的提供程序插件的校验和与 .terraform.lock.hcl 文件中记录的校验和不匹配。

Official Documentation

https://developer.hashicorp.com/terraform/language/files/dependency-lock#checksum-verification

Workarounds

  1. 90% success Run terraform init -upgrade to re-fetch the provider and update the lock file with new checksums
    Run terraform init -upgrade to re-fetch the provider and update the lock file with new checksums
  2. 75% success Check network connectivity and proxy settings; re-run terraform init
    Check network connectivity and proxy settings; re-run terraform init

中文步骤

  1. 运行 terraform init -upgrade 重新获取提供程序并用新校验和更新锁定文件
  2. 检查网络连接和代理设置;重新运行 terraform init

Dead Ends

Common approaches that don't work:

  1. 60% fail

    Lock file regeneration may still fail if provider version is pinned; also loses security verification.

  2. 95% fail

    Bypasses security; may lead to using tampered providers.