Terraform Azure provider failing to download plugins


Can someone help me to fix this issue, I’m using VS Code.

C:\TerraformFiles> terraform init

Initializing the backend…

Initializing provider plugins…

  • Finding hashicorp/azurerm versions matching “2.51.0”…

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider
hashicorp/azurerm: could not connect to registry.terraform.io: Failed to
request discovery document: Get
https://registry.terraform.io/.well-known/terraform.json”: context deadline