Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider
│ hashicorp/azuread: locked provider registry.terraform.io/hashicorp/azuread
│ 2.19.1 does not match configured version constraint 2.22.0; must use
│ terraform init -upgrade to allow selection of new versions
Locked where?
Terraform records provider versions in the dependency lock file at .terraform.lock.hcl
.
From the error, it looks like you have updated a provider version constraint and not yet run terraform init -upgrade
to update the dependency lock file.
1 Like
@Shurbeski I created an issue to track this as this should be better handled by cdktf
.
As mentioned by @alisdair, you can run terraform init -upgrade
from cdkt.out/stacks/<stack name>
directory to workaround the issue.
1 Like