azure.core.ResourceProviderRegistration

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

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceProviderRegistration("example");

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/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", nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceProviderRegistration;
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");

    }
}
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceProviderRegistration("example")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceProviderRegistration("example", {});
resources:
  example:
    type: azure:core:ResourceProviderRegistration

Registering A Preview Feature)

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

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

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/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{
			Features: core.ResourceProviderRegistrationFeatureArray{
				&core.ResourceProviderRegistrationFeatureArgs{
					Name:       pulumi.String("AKS-DataPlaneAutoApprove"),
					Registered: pulumi.Bool(true),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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()        
            .features(ResourceProviderRegistrationFeatureArgs.builder()
                .name("AKS-DataPlaneAutoApprove")
                .registered(true)
                .build())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceProviderRegistration("example", features=[azure.core.ResourceProviderRegistrationFeatureArgs(
    name="AKS-DataPlaneAutoApprove",
    registered=True,
)])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceProviderRegistration("example", {features: [{
    name: "AKS-DataPlaneAutoApprove",
    registered: true,
}]});
resources:
  example:
    type: azure:core:ResourceProviderRegistration
    properties:
      features:
        - name: AKS-DataPlaneAutoApprove
          registered: true

Create ResourceProviderRegistration Resource

new ResourceProviderRegistration(name: string, args?: ResourceProviderRegistrationArgs, opts?: CustomResourceOptions);
@overload
def ResourceProviderRegistration(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 features: Optional[Sequence[ResourceProviderRegistrationFeatureArgs]] = None,
                                 name: Optional[str] = None)
@overload
def ResourceProviderRegistration(resource_name: str,
                                 args: Optional[ResourceProviderRegistrationArgs] = None,
                                 opts: Optional[ResourceOptions] = 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.

name 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 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 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 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 String
The unique name of the resource.
args ResourceProviderRegistrationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The ResourceProviderRegistration resource accepts the following input properties:

Features List<ResourceProviderRegistrationFeatureArgs>

A list of feature blocks as defined below.

Name string

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

Features []ResourceProviderRegistrationFeatureArgs

A list of feature blocks as defined below.

Name string

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features List<ResourceProviderRegistrationFeatureArgs>

A list of feature blocks as defined below.

name String

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features ResourceProviderRegistrationFeatureArgs[]

A list of feature blocks as defined below.

name string

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features Sequence[ResourceProviderRegistrationFeatureArgs]

A list of feature blocks as defined below.

name str

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features List<Property Map>

A list of feature blocks as defined below.

name 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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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<ResourceProviderRegistrationFeatureArgs>

A list of feature blocks as defined below.

Name string

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

Features []ResourceProviderRegistrationFeatureArgs

A list of feature blocks as defined below.

Name string

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features List<ResourceProviderRegistrationFeatureArgs>

A list of feature blocks as defined below.

name String

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features ResourceProviderRegistrationFeatureArgs[]

A list of feature blocks as defined below.

name string

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features Sequence[ResourceProviderRegistrationFeatureArgs]

A list of feature blocks as defined below.

name str

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

features List<Property Map>

A list of feature blocks as defined below.

name String

The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

Supporting Types

ResourceProviderRegistrationFeature

Name string

Specifies the name of the feature to register.

Registered bool

Should this feature be Registered or Unregistered?

Name string

Specifies the name of the feature to register.

Registered bool

Should this feature be Registered or Unregistered?

name String

Specifies the name of the feature to register.

registered Boolean

Should this feature be Registered or Unregistered?

name string

Specifies the name of the feature to register.

registered boolean

Should this feature be Registered or Unregistered?

name str

Specifies the name of the feature to register.

registered bool

Should this feature be Registered or Unregistered?

name String

Specifies the name of the feature to register.

registered 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

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.