1. Packages
  2. Azure Classic
  3. API Docs
  4. core
  5. ResourceProviderRegistration

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.core.ResourceProviderRegistration

Explore with Pulumi AI

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 skip_provider_registration field within the provider block).

!> 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 the provider register these for you.

Note: Adding or Removing a Preview Feature will re-register the Resource Provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceProviderRegistration("example", {name: "Microsoft.PolicyInsights"});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceProviderRegistration("example", name="Microsoft.PolicyInsights")
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.NewResourceProviderRegistration(ctx, "example", &core.ResourceProviderRegistrationArgs{
			Name: pulumi.String("Microsoft.PolicyInsights"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceProviderRegistration("example", new()
    {
        Name = "Microsoft.PolicyInsights",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceProviderRegistration;
import com.pulumi.azure.core.ResourceProviderRegistrationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceProviderRegistration("example", ResourceProviderRegistrationArgs.builder()
            .name("Microsoft.PolicyInsights")
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceProviderRegistration
    properties:
      name: Microsoft.PolicyInsights
Copy

Registering A Preview Feature)

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceProviderRegistration("example", {
    name: "Microsoft.ContainerService",
    features: [{
        name: "AKS-DataPlaneAutoApprove",
        registered: true,
    }],
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceProviderRegistration("example",
    name="Microsoft.ContainerService",
    features=[{
        "name": "AKS-DataPlaneAutoApprove",
        "registered": True,
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.NewResourceProviderRegistration(ctx, "example", &core.ResourceProviderRegistrationArgs{
			Name: pulumi.String("Microsoft.ContainerService"),
			Features: core.ResourceProviderRegistrationFeatureArray{
				&core.ResourceProviderRegistrationFeatureArgs{
					Name:       pulumi.String("AKS-DataPlaneAutoApprove"),
					Registered: pulumi.Bool(true),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceProviderRegistration("example", new()
    {
        Name = "Microsoft.ContainerService",
        Features = new[]
        {
            new Azure.Core.Inputs.ResourceProviderRegistrationFeatureArgs
            {
                Name = "AKS-DataPlaneAutoApprove",
                Registered = true,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceProviderRegistration;
import com.pulumi.azure.core.ResourceProviderRegistrationArgs;
import com.pulumi.azure.core.inputs.ResourceProviderRegistrationFeatureArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceProviderRegistration("example", ResourceProviderRegistrationArgs.builder()
            .name("Microsoft.ContainerService")
            .features(ResourceProviderRegistrationFeatureArgs.builder()
                .name("AKS-DataPlaneAutoApprove")
                .registered(true)
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceProviderRegistration
    properties:
      name: Microsoft.ContainerService
      features:
        - name: AKS-DataPlaneAutoApprove
          registered: true
Copy

Create ResourceProviderRegistration Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ResourceProviderRegistration(name: string, args?: ResourceProviderRegistrationArgs, opts?: CustomResourceOptions);
@overload
def ResourceProviderRegistration(resource_name: str,
                                 args: Optional[ResourceProviderRegistrationArgs] = None,
                                 opts: Optional[ResourceOptions] = None)

@overload
def ResourceProviderRegistration(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 features: Optional[Sequence[ResourceProviderRegistrationFeatureArgs]] = None,
                                 name: Optional[str] = None)
func NewResourceProviderRegistration(ctx *Context, name string, args *ResourceProviderRegistrationArgs, opts ...ResourceOption) (*ResourceProviderRegistration, error)
public ResourceProviderRegistration(string name, ResourceProviderRegistrationArgs? args = null, CustomResourceOptions? opts = null)
public ResourceProviderRegistration(String name, ResourceProviderRegistrationArgs args)
public ResourceProviderRegistration(String name, ResourceProviderRegistrationArgs args, CustomResourceOptions options)
type: azure:core:ResourceProviderRegistration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ResourceProviderRegistrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ResourceProviderRegistrationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ResourceProviderRegistrationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ResourceProviderRegistrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ResourceProviderRegistrationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var resourceProviderRegistrationResource = new Azure.Core.ResourceProviderRegistration("resourceProviderRegistrationResource", new()
{
    Features = new[]
    {
        new Azure.Core.Inputs.ResourceProviderRegistrationFeatureArgs
        {
            Name = "string",
            Registered = false,
        },
    },
    Name = "string",
});
Copy
example, err := core.NewResourceProviderRegistration(ctx, "resourceProviderRegistrationResource", &core.ResourceProviderRegistrationArgs{
	Features: core.ResourceProviderRegistrationFeatureArray{
		&core.ResourceProviderRegistrationFeatureArgs{
			Name:       pulumi.String("string"),
			Registered: pulumi.Bool(false),
		},
	},
	Name: pulumi.String("string"),
})
Copy
var resourceProviderRegistrationResource = new ResourceProviderRegistration("resourceProviderRegistrationResource", ResourceProviderRegistrationArgs.builder()
    .features(ResourceProviderRegistrationFeatureArgs.builder()
        .name("string")
        .registered(false)
        .build())
    .name("string")
    .build());
Copy
resource_provider_registration_resource = azure.core.ResourceProviderRegistration("resourceProviderRegistrationResource",
    features=[{
        "name": "string",
        "registered": False,
    }],
    name="string")
Copy
const resourceProviderRegistrationResource = new azure.core.ResourceProviderRegistration("resourceProviderRegistrationResource", {
    features: [{
        name: "string",
        registered: false,
    }],
    name: "string",
});
Copy
type: azure:core:ResourceProviderRegistration
properties:
    features:
        - name: string
          registered: false
    name: string
Copy

ResourceProviderRegistration Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ResourceProviderRegistration resource accepts the following input properties:

Features List<ResourceProviderRegistrationFeature>
Name Changes to this property will trigger replacement. string
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
Features []ResourceProviderRegistrationFeatureArgs
Name Changes to this property will trigger replacement. string
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features List<ResourceProviderRegistrationFeature>
name Changes to this property will trigger replacement. String
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features ResourceProviderRegistrationFeature[]
name Changes to this property will trigger replacement. string
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features Sequence[ResourceProviderRegistrationFeatureArgs]
name Changes to this property will trigger replacement. str
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features List<Property Map>
name Changes to this property will trigger replacement. String
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the ResourceProviderRegistration resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ResourceProviderRegistration Resource

Get an existing ResourceProviderRegistration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ResourceProviderRegistrationState, opts?: CustomResourceOptions): ResourceProviderRegistration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        features: Optional[Sequence[ResourceProviderRegistrationFeatureArgs]] = None,
        name: Optional[str] = None) -> ResourceProviderRegistration
func GetResourceProviderRegistration(ctx *Context, name string, id IDInput, state *ResourceProviderRegistrationState, opts ...ResourceOption) (*ResourceProviderRegistration, error)
public static ResourceProviderRegistration Get(string name, Input<string> id, ResourceProviderRegistrationState? state, CustomResourceOptions? opts = null)
public static ResourceProviderRegistration get(String name, Output<String> id, ResourceProviderRegistrationState state, CustomResourceOptions options)
resources:  _:    type: azure:core:ResourceProviderRegistration    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Features List<ResourceProviderRegistrationFeature>
Name Changes to this property will trigger replacement. string
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
Features []ResourceProviderRegistrationFeatureArgs
Name Changes to this property will trigger replacement. string
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features List<ResourceProviderRegistrationFeature>
name Changes to this property will trigger replacement. String
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features ResourceProviderRegistrationFeature[]
name Changes to this property will trigger replacement. string
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features Sequence[ResourceProviderRegistrationFeatureArgs]
name Changes to this property will trigger replacement. str
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
features List<Property Map>
name Changes to this property will trigger replacement. String
The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

Supporting Types

ResourceProviderRegistrationFeature
, ResourceProviderRegistrationFeatureArgs

Name This property is required. string
Registered This property is required. bool
Should this feature be Registered or Unregistered?
Name This property is required. string
Registered This property is required. bool
Should this feature be Registered or Unregistered?
name This property is required. String
registered This property is required. Boolean
Should this feature be Registered or Unregistered?
name This property is required. string
registered This property is required. boolean
Should this feature be Registered or Unregistered?
name This property is required. str
registered This property is required. bool
Should this feature be Registered or Unregistered?
name This property is required. String
registered This property is required. Boolean
Should this feature be Registered or Unregistered?

Import

Resource Provider Registrations can be imported using the resource id, e.g.

$ pulumi import azure:core/resourceProviderRegistration:ResourceProviderRegistration example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.