CI on Linux fails: `the current package for registry.terraform.io/hashicorp/aws 5.72.1 doesn't match any of the checksums previously recorded in the dependency lock file`. Works on Mac laptops.
IntermediateTroubleshootingDependencies, Cycles and Providers
Answer
Likely causes → The lock file was generated on darwin_arm64 and only contains h1: hashes for that platform (when installed from a mirror/cache); CI downloads linux_amd64.
Diagnose → Count hashes: grep -A20 'hashicorp/aws' .terraform.lock.hcl.
Fix →
terraform providers lock -platform=linux_amd64 -platform=darwin_arm64 -platform=darwin_amd64 -platform=windows_amd64
Commit the updated lock file.
Prevent → Make the multi-platform providers lock command part of your upgrade script or Renovate post-upgrade task.
More on Dependencies, Cycles and Providers
`Error: Cycle: aws_security_group.app, aws_security_group.db`.Beginner`Error: Cycle: local.name_prefix, local.tags`.BeginnerA cycle appears only after adding `depends_on = [module.app]` to a module. The error lists dozens of nodes.IntermediateAdding `create_before_destroy = true` to a launch template causes `Error: Cycle: ... (destroy deposed ...)`.Advanced`terraform init` fails: `Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given constraints ~> 4.0, >= 5.30.0`.Intermediate`Error: Inconsistent dependency lock file` with `locked version selection 5.31.0 doesn't match the updated version constraints ">= 5.40.0"`.Beginner