A provider was added and the lock file was not updated
CommonSomeone added a provider to required_providers - or a module that needs one - and committed the configuration without running terraform init, or without committing the lock file it changed. Every other machine and every pipeline now has a configuration that asks for a provider its lock file has no selection for.
Confirm
terraform plan -no-color 2>&1 | grep 'no version is selected'
One line per provider the lock file is missing
Fix
- Run a plain
terraform init. Reproduced on 1.14, it installs the new provider and keeps every existing selection as it was. - Commit the updated .terraform.lock.hcl in the same change as the configuration that needed it.
- Avoid
-upgradehere unless you also mean to upgrade everything else: it re-selects the newest allowed version of every provider.
terraform init && git add .terraform.lock.hcl
Review git diff --cached .terraform.lock.hcl before committing: it should add the new provider and change nothing else.