{"id":5377,"library":"pulumi-azure-native","title":"Pulumi Azure Native","description":"Pulumi Azure Native is a Pulumi provider that enables users to manage Azure resources directly from the Azure Resource Manager (ARM) API. It offers complete coverage of Azure resources and is updated frequently, often with new features and schema changes. The current version is 3.16.0, with releases occurring roughly every 2-4 weeks.","status":"active","version":"3.16.0","language":"en","source_language":"en","source_url":"https://github.com/pulumi/pulumi-azure-native","tags":["pulumi","azure","cloud","infrastructure-as-code","iac","cloud-native"],"install":[{"cmd":"pip install pulumi-azure-native","lang":"bash","label":"Install Pulumi Azure Native"}],"dependencies":[{"reason":"Pulumi Azure Native is a provider for the Pulumi IaC framework and requires the core `pulumi` package to function.","package":"pulumi","optional":false}],"imports":[{"note":"Azure resources are organized into namespaces, typically accessed as submodules (e.g., `resources`, `storage`, `network`). It's common to import the module and then access the resource class (e.g., `resources.ResourceGroup`).","symbol":"ResourceGroup","correct":"from pulumi_azure_native import resources"},{"note":"Specific Azure services like 'Storage' or 'Network' have their own submodules under `pulumi_azure_native`.","symbol":"StorageAccount","correct":"from pulumi_azure_native import storage"},{"note":"Configuration arguments for complex types within resources are often available directly under the service submodule or by accessing `service_module.ClassNameArgs` (e.g., `storage.SkuArgs`).","symbol":"SkuArgs","correct":"from pulumi_azure_native.storage import SkuArgs"}],"quickstart":{"code":"import pulumi\nimport pulumi_azure_native as azure_native\nimport os\n\n# Pulumi requires Azure credentials to be configured (e.g., via `az login` or environment variables).\n# The Azure location is usually set via `pulumi config set azure-native:location eastus`.\n\n# Define a unique suffix for resource names to avoid conflicts\n# In a real project, this might come from pulumi.StackReference or config.\nstack_suffix = os.environ.get(\"PULUMI_STACK_SUFFIX\", \"dev\").lower()\n\n# Create an Azure Resource Group\nresource_group = azure_native.resources.ResourceGroup(\"my-resource-group\",\n    resource_group_name=f\"my-pulumi-rg-{stack_suffix}\",\n    location=\"EastUS\") # Location often configured globally via 'pulumi config set azure-native:location'\n\n# Create an Azure Storage Account\n# Note: Storage account names must be globally unique and lowercase.\nstorage_account = azure_native.storage.StorageAccount(\"mystorageaccount\",\n    resource_group_name=resource_group.name, # Pulumi automatically unwraps output properties\n    account_name=f\"mypulumiaccount{stack_suffix}123\",\n    location=resource_group.location,\n    sku=azure_native.storage.SkuArgs(name=\"Standard_LRS\"),\n    kind=\"StorageV2\")\n\npulumi.export(\"resource_group_name\", resource_group.name)\npulumi.export(\"storage_account_name\", storage_account.name)\npulumi.export(\"storage_account_primary_blob_endpoint\", storage_account.primary_endpoints.apply(lambda endpoints: endpoints.blob))\n","lang":"python","description":"This quickstart deploys an Azure Resource Group and a Storage Account using `pulumi-azure-native`. Ensure you have Pulumi CLI installed, Azure CLI logged in (`az login`), and set a default Azure location (`pulumi config set azure-native:location eastus`). The `stack_suffix` is used to ensure globally unique names for resources like storage accounts."},"warnings":[{"fix":"Review release notes before upgrading and test thoroughly. Consult the official Pulumi Azure Native API documentation for the correct resource schemas for your target version. Adjust resource definitions to match updated property names or types.","message":"Pulumi Azure Native frequently introduces breaking changes due to its direct mapping to the evolving Azure Resource Manager (ARM) API. These changes often involve the removal, renaming, or type modification of resource input properties and output properties.","severity":"breaking","affected_versions":"3.x.x (and prior major versions). E.g., v3.16.0 removed 'largeLanguageModel' from `WorkspaceApiDiagnostic` and `WorkspaceDiagnostic`. v3.13.0 removed 'addonType' from `Addon` resource inputs."},{"fix":"Always provide distinct logical names for Pulumi resources in your code. Explicitly set the `name` or `*_name` property if you require a specific physical name in Azure. For example, `azure_native.resources.ResourceGroup(\"my-rg-logic\", resource_group_name=\"my-actual-rg\")`.","message":"Pulumi uses logical resource names for its state, which are distinct from the physical resource names deployed in Azure. The first argument to a resource constructor is the logical name, while an explicit property (e.g., `resource_group_name`) sets the actual Azure resource name.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When passing an Output property to another Pulumi resource's input, pass the Output directly. Pulumi handles the dependency. If you need to transform or print an Output value, use its `.apply(lambda value: ...)` method or `pulumi.Output.all()` for multiple outputs.","message":"Resource properties are often Pulumi 'Output' types (futures) which resolve asynchronously. Attempting to use a raw Output object as a string or a direct value will result in unexpected behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure you are authenticated to Azure before running `pulumi up`. This usually involves running `az login` via the Azure CLI, or setting appropriate environment variables like `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_TENANT_ID`, and `AZURE_SUBSCRIPTION_ID`.","message":"Pulumi Azure Native relies on pre-configured Azure authentication. It does not manage your Azure credentials directly, but rather uses credentials available to the underlying Azure SDK (typically via Azure CLI login or environment variables).","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}