Get started with Pulumi and Azure
Configure access to Azure
Pulumi’s CLI needs access to your Azure account to manage cloud resources.
If you’ve already installed and configured the Azure CLI, Pulumi will respect and use your configuration settings.
You must use an Azure account that has rights to deploy and manage resources, such as storage accounts and blob containers.
Testing access
To test that your Azure access is configured properly, run:
$ az account show
> az account show
If your Azure subscription details are printed, your configuration is correct. If not, read on:
{
"environmentName": "AzureCloud",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"isDefault": true,
"name": "My Subscription",
"state": "Enabled",
"tenantId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"user": {
"name": "user@example.com",
"type": "user"
}
}
Alternative approaches
If you don’t have the Azure CLI installed, or you plan on using Pulumi in a CI/CD pipeline, you can create a service principal and set the following environment variables on your workstation:
$ export ARM_CLIENT_ID="<YOUR_CLIENT_ID>"
$ export ARM_CLIENT_SECRET="<YOUR_CLIENT_SECRET>"
$ export ARM_TENANT_ID="<YOUR_TENANT_ID>"
$ export ARM_SUBSCRIPTION_ID="<YOUR_SUBSCRIPTION_ID>"
> $env:ARM_CLIENT_ID = "<YOUR_CLIENT_ID>"
> $env:ARM_CLIENT_SECRET = "<YOUR_CLIENT_SECRET>"
> $env:ARM_TENANT_ID = "<YOUR_TENANT_ID>"
> $env:ARM_SUBSCRIPTION_ID = "<YOUR_SUBSCRIPTION_ID>"
For detailed information on Pulumi’s use of Azure credentials, see Azure Setup.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.
