1. Docs
  2. Pulumi IaC
  3. Using Pulumi
  4. Policy as code
  5. Policy Violations

Policy Violations

    Overview

    Policy Violations occur when your stack does not comply with the policies defined in your Policy Packs. These violations are logged during deployments and can either block the update (mandatory) or issue a warning (advisory), depending on the enforcement level you have set.

    How to See Policy Violations

    Policy Violations can be viewed in the Pulumi Cloud via the Policy Violations page. This page provides a centralized view of all violations across your organization, allowing you to filter and group them by various criteria such as Policy Pack, Project, Stack, and Enforcement Level.

    Accessing the Policy Violations Page

    1. Navigate to your organization in Pulumi Cloud.
    2. Click on “Policy Violations” in the sidebar.
    3. Here you will find all the policy violations in a central place.

    Policy Violations page

    Viewing the Stack Page

    1. Navigate to the stack with a policy violation.
    2. It will show on the bottom of the Overview page.

    Clicking on a resource in a violated state will also show the policy violation on the Resource page. Viewing a stack update where a policy violation occurred will detail the policy violation.

    Via API

    Policy Violations can also be accessed programmatically via the Pulumi API for custom workflows and integrations.

    For more details on using the API, refer to the Pulumi API documentation.

      PulumiUP 2024. Watch On Demand.