Terraform Cloud Learn Lab: Validate Infrastructure, Detect Drift & Enforce OPA Policies
summary
Uses Terraform Cloud + Terraform 1.2 features and OPA to enforce config and catch runtime drift: a pre and post conditions example rejects a Bastion instance with eight CPU cores via an AWS data source during plan, OPA policy sets (VCS-backed) block overly permissive security groups and no‑Friday deploys with advisory or mandatory enforcement (optional override), and business‑tier health assessments run periodic drift detection to flag manual console changes.
AI-written summary · about
chapters (9)
- 0:00Introduction and setup
- 1:23Why validate infrastructure automatically
- 8:06Pre and post conditions in Terraform
- 17:34Policy as code with OPA
- 27:41Fixing policy violations
- 33:51Health assessments and drift detection
- 40:31Demonstrating drift detection
- 42:40Auto-remediation and notifications
- 45:51Q&A and wrap-up
related talks
52mTerraform Cloud Learn Lab: Validate Infrastructure and Enforce OPA Policies
48mValidate infrastructure, detect drift, and enforce policies with HCP Terraform
30mWhy you should take care of infrastructure drift
39mAddressing Cloud Security with OPA
45mCatching Commits to Secure Infrastructure as Code
18mImplementing Unit Tests for Terraform with Open Policy Agent
32mManaging Terraform resource drift using the GitOps method
38mOPA for the cloud natives
