0
0
Terraformcloud~5 mins

Sentinel policy as code in Terraform - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Sentinel in the context of Terraform?
Sentinel is a policy as code framework used with Terraform to enforce rules and governance on infrastructure changes before they are applied.
Click to reveal answer
beginner
How does Sentinel help teams manage infrastructure?
Sentinel lets teams write policies that check Terraform plans and states to ensure compliance with organizational rules, preventing risky or unauthorized changes.
Click to reveal answer
beginner
What language is used to write Sentinel policies?
Sentinel policies are written in the Sentinel language, a simple, declarative language designed for writing policy rules that evaluate Terraform data.
Click to reveal answer
intermediate
What is a common use case for Sentinel policies in Terraform?
A common use case is to prevent creation of resources in disallowed regions or to enforce tagging standards on all resources.
Click to reveal answer
intermediate
How does Sentinel integrate with Terraform workflows?
Sentinel policies run during Terraform plan or apply phases, evaluating the planned changes and either allowing or blocking them based on policy results.
Click to reveal answer
What does Sentinel primarily enforce in Terraform?
AInfrastructure policies and governance
BTerraform syntax correctness
CCloud provider billing
DTerraform module versioning
Which phase does Sentinel evaluate Terraform changes?
ADuring Terraform plan or apply
BOnly after apply
CBefore writing Terraform code
DDuring Terraform init
Sentinel policies are written in which language?
APython
BYAML
CJSON
DSentinel language
Which of the following is a typical Sentinel policy example?
AOptimize Terraform plan speed
BBlock resources in unauthorized regions
CEncrypt Terraform state files
DManage Terraform backend configuration
What happens if a Sentinel policy fails during Terraform apply?
ATerraform plan is deleted
BTerraform apply continues anyway
CTerraform apply is blocked
DTerraform state is reset
Explain how Sentinel policies improve infrastructure governance in Terraform.
Think about how rules can stop bad changes before they happen.
You got /4 concepts.
    Describe a simple Sentinel policy example and its purpose.
    Consider a rule that controls where resources can be created.
    You got /3 concepts.