Skip to main content

Creating a Custom Policy Pack

Pulumi CrossGuard uses policy-as-code to enforce best practices, compliance, and security requirements across your infrastructure. A policy pack is a collection of policies that can be versioned and reused across projects.

In this tutorial, you will create a custom policy pack that enforces specific policies for your AWS resources, such as enabling S3 bucket versioning, restricting EC2 instance types, and requiring resource tags.

What you'll learn
  • How to define policies using Python and TypeScript
  • How to group policies into a policy pack
  • How to deploy and enforce the policy pack in your Pulumi organization
  • How to define policies involving multiple resources
Prerequisites

Topics

This tutorial has 3 topics and takes about 15 minutes to complete.
  1. 1

    Create a Custom Policy Pack

    Create a custom policy pack using Pulumi Crossguard.
    5 min
  2. 2

    Validate a Custom Policy Pack

    Validate a custom policy pack using Pulumi Crossguard.
    5 min
  3. 3

    Publish and Enforce a Custom Policy Pack

    Publish and enforce a custom policy pack using Pulumi Crossguard.
    5 min
Get started

Related

The infrastructure as code platform for any cloud.