Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
First, there should not be a " before resource_provider_registrations, syntactically.
Second, there is no "resource_provider_registrations" attribute to the provider, and attempting to set it as the diagnostic suggests results in the following error:
│ Error: Unsupported argument
│
│ on main.tf line 27, in provider "azurerm":
│ 27: resource_provider_registrations = "none"
│
│ An argument named "resource_provider_registrations" is not expected here.
If you attempt to follow this link in the last line of the diagnostic:
skip_provider_registration appears to be the actual name of the attribute. The actual link to the docs appears to be https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration. (And I think this is a boolean, so likely it should read skip_provider_registration = true.)
Actual Behaviour
The error message reads:
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Terraform does not have the necessary permissions to register Resource Providers.
│
│ Terraform automatically attempts to register the Azure Resource Providers it supports, to
│ ensure it is able to provision resources.
│
│ If you don't have permission to register Resource Providers you may wish to disable this
│ functionality by adding the following to the Provider block:
│
│ provider "azurerm" {
│ "resource_provider_registrations = "none"
│ }
│
│ Please note that if you opt out of Resource Provider Registration and Terraform tries
│ to provision a resource from a Resource Provider which is unregistered, then the errors
│ may appear misleading - for example:
│
│ > API version 2019-XX-XX was not found for Microsoft.Foo
│
│ Could suggest that the Resource Provider "Microsoft.Foo" requires registration, but
│ this could also indicate that this Azure Region doesn't support this API version.
│
│ More information on the "resource_provider_registrations" property can be found here:
│ https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#resource_provider_registrations
Steps to Reproduce
terraform plan, where you do not have permission to register resource providers
Is there an existing issue for this?
Community Note
Terraform Version
1.5.7
AzureRM Provider Version
3.116.0
Affected Resource(s)/Data Source(s)
N/A
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The error message suggests the following snippet:
First, there should not be a
"
beforeresource_provider_registrations
, syntactically.Second, there is no "
resource_provider_registrations
" attribute to the provider, and attempting to set it as the diagnostic suggests results in the following error:If you attempt to follow this link in the last line of the diagnostic:
… the target portion of that link is broken.
skip_provider_registration
appears to be the actual name of the attribute. The actual link to the docs appears to behttps://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration
. (And I think this is a boolean, so likely it should readskip_provider_registration = true
.)Actual Behaviour
The error message reads:
Steps to Reproduce
terraform plan
, where you do not have permission to register resource providersImportant Factoids
No response
References
No response