skillfed

c7n-azure

Cloud Custodian - Azure Support

c7n-azure v0.7.50 86.5K downloads/30d#13,863 on PyPI6,043
Permissive license Apache-2.0 Active released

What it is and what it does

This package extends a policy engine to Azure, letting you write declarative YAML policies that specify which Azure resources to target, how to filter them, and what actions to take—tagging, deletion, remediation, or reporting. It integrates with Azure's management APIs to discover and act on resources at scale.

It's designed for teams managing compliance, cost control, and resource lifecycle across Azure subscriptions. Policies run on-demand, scanning resources and applying consistent governance rules without manual intervention. The plugin depends on 80 Azure SDK packages to access different Azure services.

Use it for:

  • Automatically tag all untagged virtual machines or storage accounts for cost allocation and compliance tracking.
  • Enforce compliance by finding and reporting resources that violate security policies.
  • Remediate drift by stopping unused compute resources or deleting orphaned disks to reduce cloud spend.
  • Audit resource creation and modification across subscriptions and log policy execution for compliance reports.
  • Enforce naming conventions and resource group organization across Azure deployments.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

An Azure plugin for Cloud Custodian that automates policy-driven governance and compliance across Azure resources through declarative YAML policies.

Yes. The package is actively maintained, has no known vulnerabilities, and solves a real problem—scaling governance across Azure. Install it if you need policy-driven compliance, cost control, or resource lifecycle automation. The 80 Azure SDK dependencies are a one-time cost reflecting genuine breadth of Azure service coverage.

Install

c7n-azure on PyPI

pip

pip install c7n-azure

uv

uv add c7n-azure

poetry

poetry add c7n-azure

Installing c7n-azure

Before you install

Low install friction with a pure-Python wheel. Active maintenance with a recent release 78 days ago and ongoing commits. Requires 80 Azure SDK dependencies, which is substantial but reflects the breadth of Azure services it can govern.

License in practice

Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; you must retain license notices.

Quickstart

pip install c7n-azure

Create custodian.yml:
policies:
  - name: tag-vms
    resource: azure.vm
    actions:
      - type: tag
        tag: Environment
        value: Production

custodian run --output-dir=. custodian.yml

Requires Azure authentication (Azure CLI login or environment variables) and Python 3.9.2 or later.

Verify before relying

  • Whether the 80 Azure SDK dependencies are all required at runtime or some are optional based on resource types.
  • Performance characteristics and scalability limits when running policies against large Azure environments.
  • Whether policies can be scheduled automatically or if orchestration requires external tooling.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<4.0.0,>=3.9.2)
Install friction low — pure-Python wheel
Runtime dependencies 80 — adal, applicationinsights, apscheduler, azure-cosmos, azure-cosmosdb-table, azure-functions, azure-graphrbac, azure-identity, azure-keyvault-certificates, azure-keyvault-keys, azure-keyvault-secrets, azure-keyvault, azure-mgmt-advisor, azure-mgmt-apimanagement, azure-mgmt-appconfiguration, azure-mgmt-applicationinsights, azure-mgmt-appplatform, azure-mgmt-authorization, azure-mgmt-automation, azure-mgmt-batch, azure-mgmt-cdn, azure-mgmt-cognitiveservices, azure-mgmt-compute, azure-mgmt-containerinstance, azure-mgmt-containerregistry, azure-mgmt-containerservice, azure-mgmt-cosmosdb, azure-mgmt-costmanagement, azure-mgmt-databricks, azure-mgmt-datafactory
Maintenance actively maintained — 78 days since the last release
Last repo commit
First released
Downloads 86,450/month — #13,863 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: c7n_azure-0.7.50-py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseTopic :: System :: Distributed ComputingTopic :: System :: Systems Administration

Tags

azure resource governance automationazure compliance policy enforcementazure resource tagging automationcloud cost and compliance managementazure infrastructure policy as codeazure resource lifecycle managementazure policy engine
azure-governancepolicy-as-codecompliance-automation

More Distributed Computing packages