Can't Download 2.46.0 from Azure DevOps

I am getting this error

Failed to download Terraform from url https://releases.hashicorp.com/terraform/2.46.0/terraform_2.46.0_windows_amd64.zip. Error Error: Unexpected HTTP response: 403

When I try to run Terraform from AzureDevOps

The most recent version of terraform is 1.0.8.

I suspect you have typo somewhere…

Well then that makes it weird as it worked running from my local. But will try your answer and revert as soon as I have a result

OK, I thought I found the issue, the Terraform AzureDevOps task version was set to *2
I changed it along with the suggested version number in the TF file.
Now I am getting this:

2021-10-18T02:20:17.0349678Z e[31m│e[0m e[0m- failed to instantiate provider “registry.terraform.io/hashicorp/azurerm”

2021-10-18T02:20:17.0350128Z e[31m│e[0m e[0mto obtain schema: unknown provider

2021-10-18T02:20:17.0350585Z e[31m│e[0m e[0m"registry.terraform.io/hashicorp/azurerm"

2021-10-18T02:20:17.0351099Z e[31m│e[0m e[0m- failed to instantiate provider “registry.terraform.io/hashicorp/random”

2021-10-18T02:20:17.0351636Z e[31m│e[0m e[0mto obtain schema: unknown provider “registry.terraform.io/hashicorp/random”

2021-10-18T02:20:17.0352181Z e[31m│e[0m e[0m- failed to instantiate provider “registry.terraform.io/hashicorp/tls” to

2021-10-18T02:20:17.0352751Z e[31m│e[0m e[0mobtain schema: unknown provider “registry.terraform.io/hashicorp/tls”

I’m very new to Terraform, sorry if this is a caveman question.

We all started from caveman, don’t worry.

Can you share your provider blocks? it looks like this:

provider "azurerm" {
...
}

provider "tls" {
...
}


is this?
terraform {

required_providers {

azurerm = {

  source = "hashicorp/azurerm"

  version = ">= 0.11"

}

}

}

I can’t find a tls provider block

try this and do terraform init and see how it goes:

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">= 2.80"
    }
    tls = {
      version = ">=3.0"
    }
    random = {
      version = ">=3.0"
    }
  }
}
1 Like

WOW! that worked.
Now I am asking, why it is working now using 2.8?

the required provider block will specify the download source and version that your root module need. each provider have their own versions, I guess 0.11 is not a valid version for azurerm…

Thank you very much kind sir.
Now looking up some Udemy courses :slight_smile:

Good luck. Tutorials | Terraform | HashiCorp Developer is a very good starting point as well.