TF-004 Use Terraform outside the core workflow Practice Question
A team is using Terraform Cloud and wants to enforce that all AWS resources created by Terraform have a specific tag. Which feature should they use?
⚠ Common exam trap
Candidates often confuse Sentinel policies (native policy-as-code in Terraform Cloud) with run tasks (which integrate external tools). Sentinel is the correct choice for enforcing mandatory tags directly within Terraform Cloud's workflow.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Sentinel policies
Sentinel policies are Terraform Cloud's policy-as-code framework that allows teams to enforce mandatory rules on infrastructure configurations before they are applied. By writing a Sentinel policy that checks for the presence and value of a specific tag on all AWS resources, the team can reject any run that does not comply, ensuring consistent tagging across all resources created by Terraform.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Cost estimation
Why it's wrong here
Cost estimation only projects the monthly spend of a run; it inspects no resource attributes and cannot block or modify tag values. It is tempting because it surfaces cost anomalies, and it would be the right choice when the goal is budget visibility across workspaces rather than enforcing configuration standards.
- ✓
Sentinel policies
Why this is correct
Sentinel policies enforce policy-as-code within Terraform Cloud, evaluating planned changes against rules such as mandatory AWS tags and blocking non-compliant runs before apply. This provides governance across all workspaces, unlike manual review or provider defaults.
- ✗
Workspace variables
Why it's wrong here
Workspace variables supply values such as credentials or region to a run; they do not inspect resource blocks, so a missing tag is never detected or rejected. They would be correct when you need to inject environment-specific inputs, not when you must enforce a tag on every AWS resource.
- ✗
Run tasks
Why it's wrong here
Run tasks call an external service at pre-plan or post-plan stages, but they do not themselves evaluate resource attributes or guarantee a tag is applied. They suit third-party scanning or approval gates; enforcing a mandatory tag requires a policy set that validates configuration.
Go deeper
Related to this question
About these practice questions
One of 434 original TF-004 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This TF-004 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the TF-004 exam.