Pulumi AzureAD is a Python package for defining, deploying, and managing Azure Active Directory (now Microsoft Entra ID) cloud resources using Pulumi's Infrastructure as Code approach. It is currently at version 6.9.0 and follows Pulumi's rapid release cadence, often receiving weekly or bi-weekly updates to incorporate new features and bug fixes from the upstream Terraform provider.
pip install pulumi-azureadVerified import paths — ran on the pinned version, not inferred.
This quickstart program creates a new Azure Active Directory (Entra ID) security group. Before running, ensure you have configured your Azure credentials, typically by running `az login` or setting environment variables like `ARM_CLIENT_ID`, `ARM_CLIENT_SECRET`, and `ARM_TENANT_ID`.
Consult the Pulumi AzureAD migration guide for detailed steps. Be prepared to update resource property names, types, or provide missing required properties. Preview your changes (`pulumi preview`) carefully to identify potential replacements or diffs.
Ensure you are logged in via `az login` or that the necessary `ARM_` environment variables are correctly set. For CI/CD environments, consider using OpenID Connect (OIDC) or a Service Principal with appropriate permissions.
Instead of `end_date_relative`, use the `end_date` property and calculate its value using a function like Terraform's `timeadd()` (or Python's `datetime` equivalent) to specify an absolute expiry date.
Use `pulumi-azuread` for identity-related resources within Entra ID. Use `pulumi-azure-native` for all other Azure infrastructure resources. For new projects, `pulumi-azure-native` is generally recommended for ARM resources over the deprecated `pulumi-azure` (Classic) provider.
Log in via Azure CLI (`az login`), or set the necessary Pulumi configuration values (`pulumi config set azuread:clientId <CLIENT_ID>`, `pulumi config set azuread:tenantId <TENANT_ID>`, `pulumi config set azuread:clientSecret <CLIENT_SECRET>`) or environment variables (`ARM_CLIENT_ID`, `ARM_TENANT_ID`, `ARM_CLIENT_SECRET`).
Install the package using pip: `pip install pulumi-azuread`. Ensure you are running `pulumi` commands within the correct Python virtual environment if you are using one.
Choose to use either the `tags` property or the `feature_tags` property, but not both, for an `azuread.Application` resource. Remove the conflicting property.
Ensure that the `clientId` from the `azuread.Application` resource is correctly referenced and that any potential `Output` types are handled (e.g., using `.apply` in Python) if chaining resources in a complex way, for example: `client_id=application.client_id`.