Question 1 · choose 1
A compliance team wants every run in a set of workspaces to be checked against rules such as allowed regions and required tags, after the plan and before anything is applied. Which HCP Terraform feature provides this?
- AVariable sets that hold the allowed regions and tags for those workspaces
- BAgent pools that run the checks inside the compliance team's network
- CPolicy sets with Sentinel or OPA policies applied to those workspaces
- DNotification settings that email the compliance team about every plan
Show the answer and why
AVariable sets that hold the allowed regions and tags for those workspaces
Incorrect
Stored values alone cannot evaluate a plan against rules.
BAgent pools that run the checks inside the compliance team's network
Incorrect
Agents execute Terraform runs in private networks; they do not define rules.
CPolicy sets with Sentinel or OPA policies applied to those workspaces
Correct
HCP Terraform checks the plan against the policy sets applied to a workspace during each run; policies are written in Sentinel or OPA.
DNotification settings that email the compliance team about every plan
Incorrect
Notifications report events; a person would still have to check each plan.
Policy as code in HCP Terraform runs between plan and apply, on every run.
HashiCorp documentation
- Variables in HCP Terraform (opens in a new tab)
- HCP Terraform agents (runs in private networks) (opens in a new tab)
- Policy enforcement (Sentinel and OPA policy sets) (opens in a new tab)
- Run states and stages (pending, plan, cost estimation, policy check, apply) (opens in a new tab)
- Notification settings (Slack, email, webhooks, Microsoft Teams) (opens in a new tab)