Azure Classic
The classic Azure provider for Pulumi can be used to provision any of the cloud resources available in Azure via Azure Resource Manager (ARM). The Azure provider must be configured with credentials to deploy and update resources in Azure.
See the full API documentation for complete details of the available Azure provider APIs.
Setup
The Azure provider supports several options for providing access to Azure credentials. See Azure setup page for details.
Example
const azure = require("@pulumi/azure")
const resourceGroupName = new azure.core.ResourceGroup("my-group", {
location: "westus2",
});
Above is one example of an Azure resource group using Pulumi. You can find additional examples in the Pulumi examples repo.
Libraries
The following packages are available in package managers:
- JavaScript/TypeScript:
@pulumi/azure
- Python:
pulumi-azure
- Go:
github.com/pulumi/pulumi-azure/sdk/v4/go/azure
- .NET:
Pulumi.Azure
The classic Azure provider is open source and available in the pulumi/pulumi-azure repo.
Configuration
The Azure provider accepts the following configuration settings. These can be provided to the default Azure provider via pulumi config set azure:<option>
, or passed to the constructor of Provider to construct a specific instance of the Azure provider.
environment
: (Required) The cloud environment to use. It can also be sourced from the ARM_ENVIRONMENT environment variable. Supported values are:public
(default),usgovernment
,german
,china
.location
: (Optional) The location to use. ResourceGroups will consult this property for a default location, if one was not supplied explicitly.clientId
: (Optional) The client ID to use. It can also be sourced from theARM_CLIENT_ID
environment variable.clientSecret
: (Optional) The client secret to use. It can also be sourced from theARM_CLIENT_SECRET
environment variable.msiEndpoint
: (Optional) The REST endpoint to retrieve an MSI token from. Pulumi will attempt to discover this automatically but it can be specified manually here. It can also be sourced from theARM_MSI_ENDPOINT
environment variable.skipCredentialsValidation
: (Optional) Prevents the provider from validating the given credentials. When set to true,skip_provider_registration
is assumed. It can also be sourced from theARM_SKIP_CREDENTIALS_VALIDATION
environment variable; defaults tofalse
.skipProviderRegistration
: (Optional) Prevents the provider from registering the ARM provider namespaces, this can be used if you don’t wish to give the Active Directory Application permission to register resource providers. It can also be sourced from theARM_SKIP_PROVIDER_REGISTRATION
environment variable; defaults tofalse
.subscriptionId
: (Optional) The subscription ID to use. It can also be sourced from theARM_SUBSCRIPTION_ID
environment variable.tenantId
: (Optional) The tenant ID to use. It can also be sourced from theARM_TENANT_ID
environment variable.useMsi
: (Optional) Set to true to authenticate using managed service identity. It can also be sourced from theARM_USE_MSI
environment variable.
For Pulumi support and troubleshooting, click the links in the sidebar on the left of the page.