• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Terraform
  • Install
  • Tutorials
    • About the Docs
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • CDK for Terraform
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
  • Registry(opens in new tab)
  • Try Cloud(opens in new tab)
  • Sign up
Terraform Home

Tutorials

Skip to main contentTutorials

Get Started

  • AWS
  • Azure
  • Docker
  • GCP
  • OCI
  • Terraform Cloud

Fundamentals

  • CLI
  • Configuration Language
  • Modules
  • Provision
  • State
  • Terraform Cloud

Use Cases

  • Applications
  • AWS Services
  • Azure Services
  • HashiCorp Products
  • IT/SaaS Providers
  • Kubernetes
  • Machine Images
  • Networking
  • Policy
  • Security

Certification Prep

  • Associate Prep (002)
  • Associate Prep (003)
  • Associate Tutorials (002)
  • Associate Tutorials (003)

Production

  • Automate Terraform
  • Enterprise Patterns
  • Terraform Enterprise

Integrations

  • CDK for Terraform
  • Community Providers
  • Custom Framework Providers
  • Custom SDK Providers
  • Secrets

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  • Terraform Registry
    (opens in new tab)
  1. Developer
  2. Terraform
  3. Tutorials
  4. Policy

Enforce Policy with Sentinel

Enforce policies before your users create infrastructure using Sentinel policy-as-code, included in the Terraform Cloud Team and Governance tier. Write, test, and implement Sentinel policies.

Start
7 tutorials
  •  
    4min
    Install the Sentinel CLI
    Install the Sentinel CLI, a binary that allows you to run Sentinel policies locally. Then test the install by running a policy in the Sentinel CLI against Terraform Cloud data.
    • Terraform
    • Interactive
  •  
    5min
    Generate Policy Mock Data
    Generate and download plan data in Terraform Cloud for the Sentinel CLI to evaluate a policy against.
    • Terraform
  •  
    6min
    Write a Sentinel Policy for a Terraform Deployment
    Create filters and rules for your governance requirements with the Sentinel policy language
    • Terraform
  •  
    5min
    Test Sentinel Policies
    Use mock import data and the Sentinel CLI to write tests for Sentinel policies.
    • Terraform
  •  
    5min
    Upload Your Sentinel Policy Set to Terraform Cloud
    Create and upload a Sentinel policy set. Apply the policy set to your Terraform Cloud organization.
    • Terraform
  •  
    5min
    Control Costs with Policies
    Write a soft-mandatory Sentinel policy against example infrastructure to limit its cost to less than one hundred dollars a month.
    • Terraform
  •  
    18min
    Detect Infrastructure Drift and Enforce OPA Policies
    Use Terraform Cloud to enforce OPA policies and detect infrastructure configuration drift.
    • Terraform
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)