Terraform v0.11.13
Fails
provider "azurerm" {
  subscription_id = "<sub_id>"
  version = "=1.26.0"
}
resource "azurerm_resource_group" "test" {
  name     = "test1234"
  location = "usgovvirginia"
}
Works
provider "azurerm" {
  subscription_id = "<sub_id>"
  version = "=1.25.0"
}
resource "azurerm_resource_group" "test" {
  name     = "test1234"
  location = "usgovvirginia"
}
Error: Error running plan: 1 error(s) occurred:
`Using the above hcl change the provider version and run a init and plan to see the error when using newest provider.
Hi @rohrerb,
I'm sorry that 1.26 has broken for you. Without access to Azure Gov Cloud I am not going to be able to reproduce this and looking at the diff between v1.25 and v1.26 nothing is jumping out. Is there anything unique about your environment such as a proxy that is worth noting?
The resource namespace Microsoft.Cdn was added to the provider quite some time ago and the only thing regarding registration we have changed is ensuring the same senders are used for auth and client requests.
Could you possibly share with us the full debug log for both 1.25 and 1.26?
Thanks
Hi @katbyte ,
Microsoft.Cdn has been around but its not a valid provider in Azure Government yet.
debug gist > https://gist.github.com/rohrerb/aa8bc1a37e37045d0ef81cbb420521ea
Seems error is coming from terraform.EvalConfigProvider
Thank you
@rohrerb,
So I can now see we are trying to register the providers in both logs, and in 1.26 we fixed the error handling logic there actually throw up errors if provider registration failed ๐ so we were silently ignoring these errors before. You can skip provider registration if you'd like to use 1.26 via command line while we get a fix out the door:
ARM_SKIP_PROVIDER_REGISTRATION=true terraform apply
or within the provider block:
provider "azurerm" {
  subscription_id = "<sub_id>"
  version = "=1.26.0"
  skip_provider_registration = true
}
                    @rohrerb,
I plan to release v1.27.1 tomorrow with a fix for this. However that will also have support for terraform .12, if there is a need we can cut a v1.26.1 release that also has the fix without the .12 support. Just let us know, thanks for you patience.
Hi @katbyte, We use the work around until v1.27.1 is released at some point today.
Appreciate your help and quick turn around on this.
This has been released in version 1.27.1 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
    version = "~> 1.27.1"
}
# ... other configuration ...
                    Hi @katbyte,
I'm seeing this same issue in provider version 1.28.0
The workaround ( skip_provider_registration = true) gets past the errors, but seems like the fix didn't get into the newer build
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error ๐ค ๐ , please reach out to my human friends ๐ [email protected]. Thanks!