What happens when a Sentinel policy denies a Terraform plan?
Think about what 'policy enforcement' means in terms of control.
When a Sentinel policy denies a plan, Terraform blocks the apply operation to prevent non-compliant changes.
Which Sentinel policy code correctly denies any AWS EC2 instance with type 't2.micro'?
import "tfplan/v2" main = rule { all tfplan.resources.aws_instance as _, instances { all instances as _, instance { instance.applied.instance_type != "t2.micro" } } }
Look for the correct operator to check inequality and the correct quantifiers to deny 't2.micro'.
The policy uses 'all' to ensure no instance is 't2.micro' and '!=' operator for inequality in Sentinel.
In a Terraform Cloud workspace with Sentinel policies enabled, what is the correct order of events when a user runs terraform apply?
Think about the natural flow from user action to policy evaluation to final apply.
The user triggers apply, Terraform Cloud creates a plan, sends it to Sentinel, then applies or blocks based on policy.
Which Sentinel policy snippet correctly enforces that all resources have a non-empty 'Environment' tag?
Check for correct use of 'all' quantifiers and string checks.
Option A ensures every resource and instance has a non-empty string 'Environment' tag, enforcing tagging strictly.
Given a Sentinel policy with multiple rules where main is defined as main = rule1 and rule2, what is the behavior if rule1 passes but rule2 fails?
Consider how logical AND works in boolean expressions.
When rules are combined with 'and', all must pass for the policy to pass. If any fail, the policy fails.