跳到正文

Azure-Native ​

The native 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 native Azure provider supports several options for providing access to Azure credentials. See Azure setup page for details.

Getting Started ​

The quickest way to get started with Azure is to follow the Get Started guide.

From there, you can dive deeper with additional Azure examples:

Migration ​

The differences between the classic Azure provider and the native Azure provider and the process of migration are outlined in the Migration Guide guide.

If you are migrating from Azure Resource Manager templates, read our Migrate From Azure Resource Manager guide.

Example ​

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

const resourceGroup = new resources.ResourceGroup("resourceGroup");

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:

The native Azure provider SDKs are open source and available in the pulumi/pulumi-azure-native repo.

Easy SDK Integration ​

The native Azure provider SDKs provide convenience helpers to hydrate an Azure SDK client in each supported language seeded with the provider's configured credentials. This allows users to operate on resources that are not compatible with Pulumi's resource model and may not be included in the Pulumi SDKs. See below for links to examples in each of the supported languages that demonstrate invoking the Azure SDK client:

Versioning ​

The native Azure provider SDKs provide access to all API versions of each Azure resource. This way, you can access the entire Azure API surface and pin to the version you prefer.

The Version Guide describes the versioning in detail, including both module-per-version and top-level-resources approaches.

Configuration ​

The native Azure provider accepts the following configuration settings. These can be provided via pulumi config set azure-native:<option>, or passed to the constructor of Provider to construct a specific instance of the Azure provider.

  • auxiliaryTenantIds: (Optional) It can also be sourced from the following environment variable: ARM_AUXILIARY_TENANT_IDS
  • clientCertificatePassword: (Optional) The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate It can also be sourced from the following environment variable: ARM_CLIENT_CERTIFICATE_PASSWORD
  • clientCertificatePath: (Optional) The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate. It can also be sourced from the following environment variable: ARM_CLIENT_CERTIFICATE_PATH
  • clientId: (Optional) The Client ID which should be used. It can also be sourced from the following environment variable: ARM_CLIENT_ID
  • clientSecret: (Optional) The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret. It can also be sourced from the following environment variable: ARM_CLIENT_SECRET
  • disablePulumiPartnerId: (Optional) This will disable the Pulumi Partner ID which is used if a custom partnerId isn’t specified. It can also be sourced from the following environment variable: ARM_DISABLE_PULUMI_PARTNER_ID
  • environment: (Optional) The Cloud Environment which should be used. Possible values are public, usgovernment, german, and china. Defaults to public. It can also be sourced from the following environment variable: ARM_ENVIRONMENT
  • msiEndpoint: (Optional) The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically. It can also be sourced from the following environment variable: ARM_MSI_ENDPOINT
  • partnerId: (Optional) A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution. It can also be sourced from the following environment variable: ARM_PARTNER_ID
  • subscriptionId: (Optional) The Subscription ID which should be used. It can also be sourced from the following environment variable: ARM_SUBSCRIPTION_ID
  • tenantId: (Optional) The Tenant ID which should be used. It can also be sourced from the following environment variable: ARM_TENANT_ID
  • useMsi: (Optional) Allowed Managed Service Identity be used for Authentication. It can also be sourced from the following environment variable: ARM_USE_MSI

For Pulumi support and troubleshooting, click the links in the sidebar on the left of the page.

文档内容翻译自 Pulumi 官方文档。