Terraform apply secured by Open Policy Agent

By Peter ONeill

Elevator Pitch

Adding Open Policy Agent to your Terraform workflows allows you to bake in compliance checks before any resources are created, preventing any misconfigurations or bad actors from creating havoc in your environment.

Description

Terraform has unprecedented control over the mission-critical infrastructure for our businesses and organizations. Think about the last time a misconfiguration went unnoticed for long enough to impact customers or cause an outage. Everyone should have a second set of eyes when deploying code that has the potential to create a negative impact. Let Open Policy Agent (OPA) be that second set of eyes.

OPA is an open source general-purpose policy engine that is especially adept at working with configuration data like Terraform manifest files. Using OPA, we can write policies that will ensure that resources created by any team and any engineer are compliant with the organization’s rules and requirements.

Implementing policy can be challenging, but it doesn’t have to be. OPA comes paired with a purpose-built dedicated policy language called Rego. This talk will show how to get started by deploying an OPA into your CI/CD pipeline and writing your first Rego policies to secure some of the primary AWS resources we use every day.

Notes

I’m the community advocate for the Open Source project Open Policy Agent.