Hi,
I have a terraform script that does file manipulation to load files into a created GCP bucket. This uses the local provider.
We now have a release of that provider that has a “v” at the start of the version number so now my terraform fails every time with the following error:
{"@level":"error","@message":"Error: Failed to query available provider packages","@module":"terraform.ui","@timestamp":"2025-04-30T14:55:51.039799Z","diagnostic":{"severity":"error","summary":"Failed to query available provider packages","detail":"Could not retrieve the list of available versions for provider hashicorp/local: could not query provider registry for registry.terraform.io/hashicorp/local: registry response includes invalid version string \"v2.5.3-alpha1\": a \"v\" prefix should not be used\n\nTo see which modules are currently depending on hashicorp/local and what versions are specified, run the following command:\n terraform providers"},"type":"diagnostic"}
When I look at the release list I can see this:
Which does look like the latest version added has the ‘v’ in it when no others do.
I’ve tried Terraform 1.10.1 and 1.11.4 and all behave the same.
I also added an explicit version for the local provider in my script, e.g.
required_providers {
local = {
source = "hashicorp/local"
version = "2.5.2"
}
}
but the issue seems to be that the use of the “v” has broken the ability of terraform to parse the result and so I get a failure.
Anyone have any ideas about how to fix this?
Thanks
..Iain