Azure Native

v1.48.0 published on Monday, Nov 29, 2021 by Pulumi

The Azure Native provider for Pulumi can be used to provision all of the cloud resources available in Azure. It manages and provisions resources using the Azure Resource Manager (ARM) APIs.

Azure Native must be configured with credentials to deploy and update resources in Azure; see Installation & Configuration for instructions.

New to Pulumi and Azure? Get started with Azure using our tutorial

Example

import * as resources from "@pulumi/azure-native/resources";

const resourceGroup = new resources.ResourceGroup("resourceGroup");
import pulumi_azure_native as azure_native

resource_group = azure_native.resources.ResourceGroup("resourceGroup")
using Pulumi;
using Pulumi.AzureNative.Resources;

class MyStack : Stack
{
    public MyStack()
    {
        var resourceGroup = new ResourceGroup("resourceGroup");
    }

}

class Program
{
    static Task<int> Main(string[] args) => Deployment.RunAsync<MyStack>();
}
package main

import (
    "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := resources.NewResourceGroup(ctx, "resourceGroup", nil)
        if err != nil {
            return err
        }
        return nil
    })
}

Visit the How-to Guides to find step-by-step guides for specific scenarios like running an app in Azure App Service or setting up a serverless Azure Function.

Migration

From Azure Classic

If you’re already using the Pulumi Azure Classic Provider and would like to migrate to Azure Native, use the migration guide.

From Azure Resource Manager (ARM) templates

If you have Azure Resource Manager (ARM) templates that you’d like to migrate to Pulumi, use the Migrate From Azure Resource Manager guide.

Manage incompatible resources using the Azure SDK

Some Azure resources aren’t included in Azure Native because they’re not compatible with the Pulumi resource model. If you need to manage these kinds of resources, you can use convenience helpers provided by Azure Native to set up an Azure SDK client and credentials in your preferred language. Use these how-to guides to get started:

How resources are versioned

Azure Native provides access to all API versions of each Azure resource so that you can access the entire Azure API surface and pin to the version you prefer.

Read the version guide to learn more about how you can manage the Azure API versions you’re using, including both module-per-version and top-level-resources approaches.