Package @pulumi/azure

The Microsoft Azure provider package offers support for all Azure services and their properties. Services are exposed as types from modules such as appinsights, compute, and storage, among many others. Using this package allows you to programmatically declare instances of any Azure services using infrastructure as code, which Pulumi then uses to drive the Azure Resource Manager (ARM) API.

If this is your first time using this package, these two resources may be helpful:

Use the navigation below to see detailed documentation, including sample code, for each of the supported Azure services.

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

var azure = require("@pulumi/azure");
import * as azure from "@pulumi/azure";


namespace Locations



namespace Locations

const AustraliaCentral

const AustraliaCentral: Location = "australiacentral";

const AustraliaCentral2

const AustraliaCentral2: Location = "australiacentral2";

const AustraliaEast

const AustraliaEast: Location = "australiaeast";

const AustraliaSouthEast

const AustraliaSouthEast: Location = "australiasoutheast";

const BrazilSouth

const BrazilSouth: Location = "brazilsouth";

const CanadaCentral

const CanadaCentral: Location = "canadacentral";

const CanadaEast

const CanadaEast: Location = "canadaeast";

const CentralIndia

const CentralIndia: Location = "centralindia";

const CentralUS

const CentralUS: Location = "centralus";

const EastAsia

const EastAsia: Location = "eastasia";

const EastUS

const EastUS: Location = "eastus";

const EastUS2

const EastUS2: Location = "eastus2";

const FranceCentral

const FranceCentral: Location = "francecentral";

const FranceSouth

const FranceSouth: Location = "francesouth";

const JapanEast

const JapanEast: Location = "japaneast";

const JapanWest

const JapanWest: Location = "japanwest";

const KoreaCentral

const KoreaCentral: Location = "koreacentral";

const KoreaSouth

const KoreaSouth: Location = "koreasouth";

const NorthCentralUS

const NorthCentralUS: Location = "northcentralus";

const NorthEurope

const NorthEurope: Location = "northeurope";

const SouthAfricaNorth

const SouthAfricaNorth: Location = "southafricanorth";

const SouthAfricaWest

const SouthAfricaWest: Location = "southafricawest";

const SouthCentralUS

const SouthCentralUS: Location = "southcentralus";

const SouthEastAsia

const SouthEastAsia: Location = "southeastasia";

const SouthIndia

const SouthIndia: Location = "southindia";

const UAECentral

const UAECentral: Location = "uaecentral";

const UAENorth

const UAENorth: Location = "uaenorth";

const UKSouth

const UKSouth: Location = "uksouth";

const UKWest

const UKWest: Location = "ukwest";

const WestCentralUS

const WestCentralUS: Location = "westcentralus";

const WestEurope

const WestEurope: Location = "westeurope";

const WestIndia

const WestIndia: Location = "westindia";

const WestUS

const WestUS: Location = "westus";

const WestUS2

const WestUS2: Location = "westus2";


Resource Provider

class Provider extends ProviderResource

The provider type for the azurerm package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

This content is derived from


new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)

Create a Provider resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Provider. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method register

static register(provider: ProviderResource | undefined): Promise<string | undefined>

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.


function getEnv

getEnv(vars: string[]): string | undefined

function getEnvBoolean

getEnvBoolean(vars: string[]): boolean | undefined

function getEnvNumber

getEnvNumber(vars: string[]): number | undefined

function getVersion

getVersion(): string

type Location

type Location = "eastasia" | "southeastasia" | "centralus" | "eastus" | "eastus2" | "westus" | "westus2" | "northcentralus" | "southcentralus" | "northeurope" | "westeurope" | "japanwest" | "japaneast" | "brazilsouth" | "australiaeast" | "australiasoutheast" | "australiacentral" | "australiacentral2" | "southindia" | "centralindia" | "westindia" | "canadacentral" | "canadaeast" | "uksouth" | "ukwest" | "westcentralus" | "koreacentral" | "koreasouth" | "francecentral" | "francesouth" | "southafricanorth" | "southafricawest" | "uaecentral" | "uaenorth";

type Overwrite

type Overwrite = Pick<T, Diff<keyof T, keyof U>> & U;

interface ProviderArgs

interface ProviderArgs

The set of arguments for constructing a Provider resource.

property auxiliaryTenantIds

auxiliaryTenantIds?: pulumi.Input<pulumi.Input<string>[]>;

property clientCertificatePassword

clientCertificatePassword?: pulumi.Input<string>;

The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate

property clientCertificatePath

clientCertificatePath?: pulumi.Input<string>;

The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate.

property clientId

clientId?: pulumi.Input<string>;

The Client ID which should be used.

property clientSecret

clientSecret?: pulumi.Input<string>;

The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.

property disableCorrelationRequestId

disableCorrelationRequestId?: pulumi.Input<boolean>;

This will disable the x-ms-correlation-request-id header.

property disableTerraformPartnerId

disableTerraformPartnerId?: pulumi.Input<boolean>;

This will disable the Terraform Partner ID which is used if a custom partner_id isn’t specified.

property environment

environment?: pulumi.Input<string>;

The Cloud Environment which should be used. Possible values are public, usgovernment, german, and china. Defaults to public.

property msiEndpoint

msiEndpoint?: pulumi.Input<string>;

The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically.

property partnerId

partnerId?: pulumi.Input<string>;

A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution.

property skipCredentialsValidation

skipCredentialsValidation?: pulumi.Input<boolean>;

This will cause the AzureRM Provider to skip verifying the credentials being used are valid.

property skipProviderRegistration

skipProviderRegistration?: pulumi.Input<boolean>;

Should the AzureRM Provider skip registering all of the Resource Providers that it supports, if they’re not already registered?

property subscriptionId

subscriptionId?: pulumi.Input<string>;

The Subscription ID which should be used.

property tenantId

tenantId?: pulumi.Input<string>;

The Tenant ID which should be used.

property useMsi

useMsi?: pulumi.Input<boolean>;

Allowed Managed Service Identity be used for Authentication.