Azuredevops provider

I added into an existing project:
but i wanted to use the microsoft/azuredevops provider to manage pipeline access for new resources.

i am using the provider block directly from the github repo : GitHub - microsoft/terraform-provider-azuredevops: Terraform Azure DevOps provider

here is the top of my main.tf
terraform {
required_version = “>=0.14”
backend “azurerm” {
access_key = “”
storage_account_name = “”
container_name = “”
key = “…”
}
required_providers {
azuredevops = {
source = “microsoft/azuredevops”
version = “0.1.1”
}
azure = {
source = “hashicorp/azurerm”
version = “2.40.0”
}
}
}
provider “azure” {
alias = “westus”
features {}
}

when in to init again: and get this error

Initializing modules…

Initializing the backend…

Initializing provider plugins…

  • Finding latest version of hashicorp/random…
  • Finding latest version of hashicorp/azuredevops…
  • Finding microsoft/azuredevops versions matching “0.1.1”…
  • Reusing previous version of hashicorp/azurerm from the dependency lock file
  • Reusing previous version of hashicorp/azuread from the dependency lock file
  • Installing hashicorp/random v3.0.1…
  • Installed hashicorp/random v3.0.1 (signed by HashiCorp)
  • Installing microsoft/azuredevops v0.1.1…
  • Installed microsoft/azuredevops v0.1.1 (signed by a HashiCorp partner, key ID 6F0B91BDE98478CF)
  • Installing hashicorp/azurerm v2.40.0…
  • Installed hashicorp/azurerm v2.40.0 (signed by HashiCorp)
  • Installing hashicorp/azuread v1.1.1…
  • Installed hashicorp/azuread v1.1.1 (signed by HashiCorp)

Partner and community providers are signed by their developers.
If you’d like to know more about provider signing, you can read about it here:

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider
hashicorp/azuredevops: provider registry registry.terraform.io does not have a
provider named registry.terraform.io/hashicorp/azuredevops

i did change the provider version to specific 0.1.1 but still the same issue

https://registry.terraform.io/providers/microsoft/azuredevops/latest
does exist - and shows the latest version of 0.1.1

it seams like terraform is assuming the path should be
registry.terraform.io/hashicorp/azuredevops

i can’t find anything on the interwebs or the providers bugs:
some references to upgrading to .13 but this code was developed >.13 and currently running .14.5

any ideas would be great.

-don

Could you try running terraform init -upgrade=true so that the version lock file is updated? Installation of the provider worked for me.

Hi!

Same Problem here. But this only appears, if I want to create azuredevops resources within a module.

BTW. I started from scratch with Terraform 0.14.5 and this behaviour persists. So the mentioned solution doesn’t work for me :frowning:

Jan

Do you have a repo to download and test with?
Above code still works for me.

i don’t have this in a public repo:

but running the upgrade resulted in:

tf init -upgrade=true
Upgrading modules…

  • IaaSFarm in IaaSFarm
  • ams in ams
  • appinsight in appinsight
  • appreg in appreg
  • asp in asp
  • function in function
  • logic in logic
  • resourcegroup in rg
  • storage in storage
  • vnet in vnet

Initializing the backend…

Initializing provider plugins…

  • Finding microsoft/azuredevops versions matching “0.1.1”…
  • Finding latest version of hashicorp/azuread…
  • Finding latest version of hashicorp/random…
  • Finding latest version of hashicorp/azuredevops…
  • Finding hashicorp/azurerm versions matching “2.40.0”…
  • Installing microsoft/azuredevops v0.1.1…
  • Installed microsoft/azuredevops v0.1.1 (signed by a HashiCorp partner, key ID 6F0B91BDE98478CF)
  • Installing hashicorp/azuread v1.3.0…
  • Installed hashicorp/azuread v1.3.0 (signed by HashiCorp)
  • Installing hashicorp/random v3.0.1…
  • Installed hashicorp/random v3.0.1 (signed by HashiCorp)
  • Installing hashicorp/azurerm v2.40.0…
  • Installed hashicorp/azurerm v2.40.0 (signed by HashiCorp)

Partner and community providers are signed by their developers.
If you’d like to know more about provider signing, you can read about it here:

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider
hashicorp/azuredevops: provider registry registry.terraform.io does not have a
provider named Terraform Registry

What’s the output of terraform providers?

Did you also upgrade terraform while changing the code?

Which providers are set in the state-file?

I’ve also configured a module and successfully loaded the provider microsoft/azuredevops within the module.

Did you get to solve this problem? I am with the same problem.

Did you solve this? Getting same issue
Error: Failed to query available provider packages

│ Could not retrieve the list of available versions for provider hashicorp/azuredevops: provider registry registry.terraform.io does not have a provider named
registry.terraform.io/hashicorp/azuredevops

│ Did you intend to use microsoft/azuredevops? If so, you must specify that source address in each module which requires that provider. To see which modules
│ are currently depending on hashicorp/azuredevops, run the following command:
│ terraform providers

This is my terraform provider command output
terraform providers

Providers required by configuration:
.
├── module.azure-pipeline
│ └── provider[registry.terraform.io/hashicorp/azuredevops]
├── module.cdn
│ └── provider[registry.terraform.io/hashicorp/aws]
├── module.efs-accesspoint
│ ├── provider[terraform.io/builtin/terraform]
│ └── provider[registry.terraform.io/hashicorp/aws]
├── module.s3
│ └── provider[registry.terraform.io/hashicorp/aws]
└── module.schema
├── provider[registry.terraform.io/hashicorp/mysql]
└── provider[registry.terraform.io/hashicorp/aws]

I was able to resolve the issue finally after passing the source provider details in the module itself. So for any third party providers we need to pass source provider info into the modules directly.