azurermResourceProviderRegistration
Manages the registration of a Resource Provider - which allows access to the API's supported by this Resource Provider.
-> The Azure Provider will automatically register all of the Resource Providers which it supports on launch (unless opted-out using the skipProviderRegistration
field within the provider block).
!> Note: The errors returned from the Azure API when a Resource Provider is unregistered are unclear (example apiVersion '20190101'WasNotFoundFor 'microsoftFoo'
) - please ensure that all of the necessary Resource Providers you're using are registered - if in doubt we strongly recommend letting Terraform register these for you.
-> Note: Adding or Removing a Preview Feature will re-register the Resource Provider.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.resourceProviderRegistration.ResourceProviderRegistration(
this,
"example",
{
name: "Microsoft.PolicyInsights",
}
);
Example Usage (Registering a Preview Feature)
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
skip_provider_registration: true,
});
new azurerm.resourceProviderRegistration.ResourceProviderRegistration(
this,
"example",
{
feature: [
{
name: "AKS-DataPlaneAutoApprove",
registered: true,
},
],
name: "Microsoft.ContainerService",
}
);
Argument Reference
The following arguments are supported:
-
name
- (Required) The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. -
feature
- (Optional) A list offeature
blocks as defined below.
\~> Note: The feature
block allows a Preview Feature to be explicitly Registered or Unregistered for this Resource Provider - once a Feature has been explicitly Registered or Unregistered, it must be specified in the Terraform Configuration (it's not possible to reset this to the default, unspecified, state).
A feature
block supports the following:
name
- (Required) Specifies the name of the feature to register.
\~> Note: Only Preview Features which have an approvalType
of autoApproval
can be managed in Terraform, features which require manual approval by Service Teams are unsupported. More information on Resource Provider Preview Features can be found in this document
registered
- (Required) Should this feature be Registered or Unregistered?
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 120 minutes) Used when registering the Resource Provider/Features.read
- (Defaults to 5 minutes) Used when retrieving the Resource Provider.update
- (Defaults to 120 minutes) Used when updating the Resource Provider/Features.delete
- (Defaults to 30 minutes) Used when unregistering the Resource Provider.
Import
Resource Provider Registrations can be imported using the resourceId
, e.g.