Pulumi Azure Active Directory (Azure AD)

6.9.0 · active · verified Wed Apr 15

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.

Warnings

Install

Imports

Quickstart

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`.

import pulumi
import pulumi_azuread as azuread
import os

# Ensure Azure credentials are set via environment variables or `az login`
# Example: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_TENANT_ID, ARM_SUBSCRIPTION_ID
# Pulumi typically picks these up automatically or via `pulumi config set`.
# For local testing, ensure `az login` has been run or environment variables are configured.
# For CI/CD, consider OIDC or Service Principal authentication.

# Create an Azure AD Group
my_group = azuread.Group(
    "my-python-group",
    display_name="MyPythonManagedGroup",
    mail_enabled=False,
    security_enabled=True
)

# Export the ID of the created group
pulumi.export("groupId", my_group.id)

view raw JSON →