--- id: pulumi-policy version: "1.21.0" license: Apache 2.0 license_treatment: permissive maintenance: active --- # pulumi-policy — Pulumi's Policy Python SDK License: permissive · Maintenance: active · Downloads: 316.5K/mo ## What it is and what it does Pulumi Policy SDK is a Python library for writing and enforcing policy rules on infrastructure deployed through Pulumi. It runs during `pulumi preview` and `pulumi up` to validate that cloud resources comply with organizational standards before creation or update. Rules can be set to advisory (warnings), mandatory (errors), or remediate (automatic fixes), with violations batched during preview and halting deployment on first error during update. The package depends on pulumi, protobuf, grpcio, and setuptools. Policies written in Python can be applied to Pulumi stacks written in any language, making it a cross-language governance tool. It is actively maintained and widely used in the Pulumi ecosystem. Use it for: - Enforce tagging standards on all cloud resources before deployment to ensure compliance and cost tracking. - Validate that databases and storage are encrypted and publicly accessible resources are restricted. - Automatically remediate common misconfigurations like missing backup policies or non-compliant naming conventions. - Prevent deployment of resources that violate security or cost policies during preview phase. - Implement organizational standards across teams using Pulumi in different languages. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Defines and enforces policy rules on cloud resources during Pulumi deployments, with support for advisory warnings, mandatory errors, and automatic remediation. Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a real need for infrastructure governance in Pulumi deployments. It is stable and widely adopted (top 15000 PyPI packages). Install if you use Pulumi and need to enforce policy on cloud resources. ## Install pip install pulumi-policy uv add pulumi-policy poetry add pulumi-policy ## Installing pulumi-policy Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained as of 2026-08-09 with regular releases; last update 86 days ago. License in practice: Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions. Quickstart: pip install pulumi-policy from pulumi_policy import ( EnforcementLevel, PolicyPack, ResourceValidationPolicy, ) PolicyPack( name="my-policy", enforcement_level=EnforcementLevel.MANDATORY, policies=[ ResourceValidationPolicy( name="my-rule", description="Example policy rule", validate=lambda args: [], ), ], ) Verify before relying: - Whether Python version constraints exist beyond what the fact sheet specifies (requires_python is unspecified) - Whether the package works with all Pulumi stack languages or has language-specific limitations in practice ## Package facts - License: Apache 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 316.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pulumi policy enforcement, cloud resource compliance rules, policy as code for infrastructure, pulumi crossguard policies, infrastructure policy validation, automated policy remediation, deployment policy checks, policy-as-code, infrastructure-governance, pulumi-ecosystem [View on SkillFed](https://skillfed.io/packages/pulumi-policy) · [View on PyPI](https://pypi.org/project/pulumi-policy/)