Open raszkiewicz opened 3 years ago
I have the same issue attempting to run terraform init
with Google provider.
Initializing the backend...
Initializing provider plugins...
- Finding latest version of hashicorp/google...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/google: could not query provider registry for
│ registry.terraform.io/hashicorp/google: the request failed after 2 attempts, please try again later: Get
│ "https://registry.terraform.io/v1/providers/hashicorp/google/versions": context deadline exceeded
I turned on my VPN and this resolved my issue. From what I read in other posts there is an issue with the DNS resolution with this version of Terraform.
curl https://registry.terraform.io/v1/providers/hashicorp/google/versions
Using the terraform init
command returned the error:
Initializing the backend...
Initializing provider plugins...
- Finding latest version of hashicorp/google...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/google: could not query provider registry for
│ registry.terraform.io/hashicorp/google: the request failed after 2 attempts, please try again later: Get
│ "https://registry.terraform.io/v1/providers/hashicorp/google/versions": context deadline exceeded
terraform init
works as intended I'm having the same issue with versions 1.1.4 and 0.15.5 installed with tfenv. No problems are present using terraform 1.1.4 from the official Arch repositories so I guess this has to do with tfenv.
This needs more diagnosis where the problem can be reproduced. I'm unable to reproduce it with the information available. The plugin retrieval is being done in Go by terraform, so the only impact tfenv can have that I can think of is modification of the shell environment used to execute terraform; although it does go out of its way not to do that. Im thinking for example could there be proxy settings involved or a netrc that are not getting passed through when using TFENV?
I'm getting that error:
Regular terraform (v 0.14.2) installation throughout the homebrew works fine.
Any clue how to get terraform from
tfenv
to work?