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 "+1" or "me too" comments, 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.
Description
Some resource that I manage via terraform requires Providers which a not enabled by default, e.g. Microsoft.Communication
I would like to integrate the provider registration into Terraform, using:
resource "azurerm_resource_provider_registration" "Communication" {
name = "Microsoft.Communication"
}
This is working fine for new subscription, but for existing subscription a import (of the provider) is needed.
Since 1.6.0, I can use plannable import to avoid such steps.
import {
to = azurerm_resource_provider_registration.Communication
id = "/subscriptions/${data.azurerm_client_config.this.subscription_id}/providers/Microsoft.Communication"
}
This is working fine for existing subscription only, for new subscriptions, I get an error:
Error: importing Microsoft.Communication: Resource Provider must be registered to be imported
It would be great, if import of unregistered Providers is supported. This would finally solve the issue for registered Preview Features of Providers that are already registered by Terraform
New or Affected Resource(s)/Data Source(s)
azurerm_resource_provider_registration
Potential Terraform Configuration
import {
to = azurerm_resource_provider_registration.Communication
id = "/subscriptions/${data.azurerm_client_config.this.subscription_id}/providers/Microsoft.Communication"
}
Is there an existing issue for this?
Community Note
Description
Some resource that I manage via terraform requires Providers which a not enabled by default, e.g.
Microsoft.Communication
I would like to integrate the provider registration into Terraform, using:
This is working fine for new subscription, but for existing subscription a import (of the provider) is needed.
Since 1.6.0, I can use plannable import to avoid such steps.
This is working fine for existing subscription only, for new subscriptions, I get an error:
https://github.com/hashicorp/terraform-provider-azurerm/blob/b10a6dbc8400ea21a6169a72824287347d8ed2de/internal/services/resource/resource_provider_registration_resource.go#L360
It would be great, if import of unregistered Providers is supported. This would finally solve the issue for registered Preview Features of Providers that are already registered by Terraform
New or Affected Resource(s)/Data Source(s)
azurerm_resource_provider_registration
Potential Terraform Configuration
References
No response