Write a Sentinel policy for a Terraform deployment
Create filters and rules for your governance requirements with the Sentinel policy language.
Use case
Enforce policies before your users create infrastructure using Sentinel policy as code.
Challenge
Rapid provisioning opens up tremendous possibilities, but organizations need to maintain security and prevent over provisioning.
Solution
HCP Terraform can help you enforce policies on the infrastructure configurations your teams can provision. Ticket-based review processes are a bottleneck that can slow down development. Instead, you can use HashiCorp Sentinel, a policy as code framework, to automatically enforce compliance and governance policies before Terraform makes infrastructure changes.
Create filters and rules for your governance requirements with the Sentinel policy language.
Create and upload a Sentinel policy set. Apply the policy set to your HCP Terraform organization.
Use Terraform preconditions and HCP Terraform native OPA support to validate configuration and enforce compliance with organizational practices.
Sentinel policies can be created for every stage of the Terraform workflow, including the configuration, plan, run, and state.
Policy sets are collections of Sentinel or OPA policies you can apply to your workloads in HCP Terraform.
An important part of the test process is mocking the data that you wish your policies to operate on.