Introducing Terracotta AI Guardrails: Context-Aware Policy as Code for Terraform

Introducing Terracotta AI Guardrails: Context-Aware Policy as Code for Terraform

At Terracotta AI, we've always believed that the best infrastructure is secure, consistent, and context-aware. Organizations and teams rely heavily on each other and must consistently provide highly available, resilient, and reliable infrastructure to their customers. That's why we're excited to announce our upcoming feature: Terracotta Guardrails.


The Challenge with Traditional Policy as Code

Policy-as-code frameworks, such as OPA (Open Policy Agent) and Sentinel, are powerful tools for enforcing best practices in infrastructure-as-code. They let you define rules for everything from security baselines to naming conventions. They're OPA tools and they're industry standards, ensuring that Infrastructure as Code, such as Terraform, is secure, consistent, and aligned with your team's security and operational policies.

But there's a catch...

Most policy checks work in binary. Pass or fail. Green or red.

They don't tell you WHY a change violates policy or how to fix it.

And they don't take your team's unique standards and context into account.

Enter Guardrails: Policy That Understands Context

Terracotta AI's Guardrails change that.

With Guardrails, Terracotta AI doesn't just run generic static checks. It brings your team's internal best practices and custom standards directly into your Infrastructure as Code ecosystem through each pull request IaC review process, powered by purpose-built IaC AI and real-time contextual feedback of your entire deployment pipeline.

Here's how it works:

How Guardrails Work

Guardrails lets you upload your internal documents, checklists, or standards as context for the AI model.  These are the actual best practices your company has iterated on and refined over the years to make your infrastructure safe, consistent, and tailored to the way YOUR TEAMS run it.

For example:

  • A rule to require encryption on all S3 buckets
  • A note that sensitive parameters like tenant_id should never be hardcoded
  • A naming convention for resources across environments
  • Guidelines for consistent tagging
  • Capacity and quota limitations

Terracotta AI treats these Guardrails as part of its AI review in the pull request:

✅ It compares live PR changes against your team's uploaded standards

✅ It flags violations with clear, plain-English explanations

✅ It surfaces inconsistencies or drifts before they reach the plan or apply stage

And because it's all embedded in your PR workflow, developers see precisely what to fix and WHY it matters. This is critical in reducing the friction between all teams involved in the deployment process of your infrastructure and code.

Why Guardrails Matter

Guardrails aren't just another layer of policy enforcement. They ultimately personalize the way each company runs its Infrastructure as Code deployments, making changes less risky and streamlining the deployment process. They're a new way to:

  • Enforce Your Own Best Practices
    • Your team's rules are not just generic static checks.
  • Empower Developers with Clarity
    • Developers see why something is out of bounds, not just that it failed.
  • Account for Context, Drift, and Risk
    • Guardrails work in tandem with Terracotta's AI engine, factoring in drift, downstream impact, real-world state, and other critical context to provide comprehensive feedback.
  • Move Faster Without Compromise
    • Issues are caught in the pull request, not later in the pipeline, so you keep moving fast without sacrificing security or stability.

The Bottom Line

Terracotta AI's new Guardrails transform your best practices into an automated safety net, ensuring your team's standards are applied to every Terraform change. This provides developers with actionable feedback that's contextual and explainable, allowing them to focus on developing better application code.

Also, Guardrails help platform teams sleep better at night, knowing that what's in the repo truly matches what should be in production. No more gotchas, just more confident Terraform and IaC deployments.

Curious how Terracotta AI's Guardrails can fit into your DevOps, SRE, and Platform engineering team's workflows?

👉 Try Terracotta AI or get in touch to learn more.

Carlos Feliciano

Carlos Feliciano

Founder & CEO of Terracotta AI (YC S23), former director of solutions architecture @OpsRamp, Cloud Connoisseur.
San Francisco Bay Area