terraform-provider-azuredevops: provider "azuredevops". Error: The resource cannot be found.

Terraform (and Azure DevOps Provider) Version: 0.12.19

Affected Resource(s)

  • azuredevops_XXXXX

Terraform Configuration Files

#main.tf
terraform {
   backend "azurerm" {
   }
}

provider "azurerm" {
  version = "=2.46.0"
  features {}
}

provider "azuredevops" {
  version = ">=0.1.0"
  org_service_url = "https://dev.azure.com/<org>"
  personal_access_token = "<pat>"
}

Error Output

Error: The resource cannot be found.

on main.tf line 32, in provider “azuredevops”: 32: provider “azuredevops” {

Actual Behavior

It was okay a few hours ago. Then suddenly the resource cannot be found for some reason.

Steps to Reproduce

I run the terraform through azure devops pipeline to create azure devops k8s service connection. It was fine a few hours ago then it suddenly failed to find the provider. I am sure sure the ado k8s service connection terrafrom script works fine as it did work before and i didnt change anything.

About this issue

Most upvoted comments

One note only: I use provider registry.terraform.io/microsoft/azuredevops v0.4.0. on Ubuntu. It works nice. I gave error

Error: The resource cannot be found.
│ 
│   with provider["registry.terraform.io/microsoft/azuredevops"],

I found that this error gives me incorrect value in parameters in org_service_url

provider "azuredevops" { 
    org_service_url       = "https://dev.azure.com/xxx"
    personal_access_token = "xxxxxxxyyyyyyyxxxxxxxnyyyyyyyyyyyxxxxxx"
}

May be could check correct value in org_service_url as first in this error type.

I’m facing the same issue. Does anyone have a fix for this issue yet? Reported the issue here too: https://github.com/microsoft/terraform-provider-azuredevops/issues/652