Skip to content

Commit

Permalink
r/resource_provider_registration: being explicit with the new feature…
Browse files Browse the repository at this point in the history
…s functionality
  • Loading branch information
tombuildsstuff committed Sep 22, 2021
1 parent 59a36f1 commit 1095484
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions website/docs/r/resource_provider_registration.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,31 @@ Manages the registration of a Resource Provider - which allows access to the API

!> **Note:** The errors returned from the Azure API when a Resource Provider is unregistered are unclear (example `API version '2019-01-01' was not found for 'Microsoft.Foo'`) - 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

```hcl
resource "azurerm_resource_provider_registration" "example" {
name = "Microsoft.PolicyInsights"
}
```

## Example Usage (Registering a Preview Feature)

```hcl
provider "azurerm" {
features {}
skip_provider_registration = true
}
resource "azurerm_resource_provider_registration" "example" {
name = "Microsoft.ContainerService"
feature {
name = "AKS-DataPlaneAutoApprove"
name = "AKS-DataPlaneAutoApprove"
registered = true
}
}
```
Expand All @@ -33,25 +51,25 @@ The following arguments are supported:

* `feature` - (Optional) A list of `feature` 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.

* `registered` - (Required) A boolean value indicating whether the feature is registered.

-> The `feature` block allows a Preview Feature to be either explicitly Registered or Unregistered for this Resource Provider. Since many Preview Features are available, Terraform will ignore Preview Features which are not explicitly defined in the Terraform Configuration at this time.

~> 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](https://docs.microsoft.com/en-us/rest/api/resources/features)
~> **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](https://docs.microsoft.com/en-us/rest/api/resources/features)

* `registered` - (Required) Should this feature be Registered or Unregistered?

## Timeouts

The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions:

* `create` - (Defaults to 30 minutes) Used when registering the Resource Provider.
* `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
Expand Down

0 comments on commit 1095484

Please sign in to comment.