Courseiva
Use Terraform outside the core workflowhardMultiple SelectObjective-mapped

Sentinel Policy Capabilities: Enforcing Compliance in Terraform Cloud

Which THREE of the following are capabilities of Terraform Cloud's Sentinel policy framework? (Choose three.)

Quick Answer

The answer is that Sentinel policy capabilities include restricting the creation of certain resource types, enforcing mandatory tags, and checking compliance against custom rules. These three functions form the core of Sentinel's policy-as-code framework, which operates as a guardrail in Terraform Cloud’s run lifecycle by evaluating Terraform plans against defined policies before any infrastructure is provisioned. On the HashiCorp Terraform Associate TF-003 exam, this question tests your ability to distinguish Sentinel’s built-in enforcement actions from separate features like cost estimation, which is handled by a different service, or time-based blocking, which is not a native Sentinel capability. A common trap is confusing Sentinel’s policy enforcement with Terraform Cloud’s overall feature set, so remember that Sentinel focuses on logical checks—like resource type restrictions and tag validation—not on scheduling or cost calculations. For a quick memory tip, think “RTC”: Restrict, Tag, Check—the three core actions that Sentinel performs to enforce compliance.

⚠ Common exam trap

A common mix-up: candidates confuse Sentinel's policy enforcement with Terraform Cloud's other features, such as cost estimation or run triggers, and incorrectly assume Sentinel can handle time-based or cost-related logic natively.

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

Enforce that resources have mandatory tags

Terraform Cloud's Sentinel policy framework allows you to define policy-as-code rules that can enforce mandatory tags on resources. By writing a Sentinel policy that checks for the presence of specific tags (e.g., 'Environment', 'Owner') during the plan phase, you can block or warn on any resource creation that lacks those tags, ensuring compliance with organizational tagging standards.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Block Terraform runs based on the time of day

    Why it's wrong here

    Not built into Sentinel; would require external triggers.

  • Enforce that resources have mandatory tags

    Why this is correct

    Sentinel can validate resource attributes.

  • Check that resources comply with security best practices

    Why this is correct

    Sentinel can enforce security policies.

  • Restrict the creation of certain resource types

    Why this is correct

    Sentinel can block based on resource type.

  • Estimate the cost of infrastructure changes

    Why it's wrong here

    Cost estimation is a separate Terraform Cloud feature.

About these practice questions

This TF-004 question is part of Courseiva's 428-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on TF-004

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which TWO of the following are valid use cases for using Terraform Cloud's Sentinel policies? (Choose two.)

medium
  • A.Provide cost estimates for infrastructure changes
  • B.Enforce that all Terraform code follows a specific formatting style
  • C.Enforce that all AWS instances are of a specific type
  • D.Automatically rotate database passwords
  • E.Enforce that all resources have required tags

Why C: Sentinel policies can enforce that all AWS instances are of a specific type by using a `validate` rule that checks the `aws_instance` resource's `instance_type` attribute against an allowed list. This is a common compliance use case for Sentinel in Terraform Cloud, where policy-as-code ensures infrastructure adheres to organizational standards before provisioning. Similarly, Sentinel can enforce that all resources have required tags by inspecting the `tags` attribute in the Terraform plan and ensuring specific keys and values are present, which is another common compliance and governance use case.

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.