Courseiva
Use the core Terraform workflowhardMultiple ChoiceObjective-mapped

TF-004 Use the core Terraform workflow Practice Question

A company uses Terraform Cloud and wants to enforce policies that prevent creating resources with public IP addresses unless explicitly approved. What Terraform Cloud feature should they use?

⚠ Common exam trap

A common mistake in Terraform Cloud is confusing Sentinel policies with run tasks. Run tasks are for integrating external tools (like security scanners), not for enforcing custom governance rules. Sentinel is the built-in policy-as-code engine.

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 is HashiCorp's policy-as-code framework that integrates directly with Terraform Cloud. It allows you to define fine-grained, logic-based policies (e.g., 'deny resources with public IPs unless a specific approval tag is present') that are enforced during the plan phase before any resources are created. This is the correct feature for enforcing custom governance rules on infrastructure provisioning.

Answer analysis

Option-by-option breakdown

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

  • Sentinel policies

    Why this is correct

    Sentinel is HashiCorp's policy-as-code framework, deeply integrated with Terraform Cloud to enforce governance rules. It allows organizations to define granular policies that evaluate Terraform plans and states, preventing non-compliant infrastructure changes before they are applied. Policies can enforce various rules, such as mandatory tagging, allowed AWS regions, or resource size limits, ensuring compliance and security.

  • VCS integration

    Why it's wrong here

    Version Control System (VCS) integration in Terraform Cloud connects workspaces to a Git repository, enabling automatic run triggers upon code commits. While essential for managing infrastructure-as-code and automating the deployment pipeline, VCS integration itself is solely responsible for source code management and initiating Terraform runs, not for evaluating or enforcing compliance policies on the infrastructure defined by that code.

  • Workspaces

    Why it's wrong here

    Workspaces in Terraform Cloud serve as isolated environments for managing distinct sets of infrastructure or different stages of a project (e.g., dev, staging, prod). They encapsulate state files, variables, and run history, providing logical separation. However, workspaces are organizational units; they do not possess built-in capabilities to define, evaluate, or enforce policy-as-code rules against the infrastructure they manage.

  • Run tasks

    Why it's wrong here

    Run tasks in Terraform Cloud allow users to integrate external tools and custom scripts into the Terraform run lifecycle, executing them at specific phases like `plan` or `apply`. While useful for custom validations, security scans, or notifications, run tasks are designed for extending functionality with external systems. They are not the native, declarative policy-as-code framework for enforcing governance within Terraform Cloud; Sentinel fulfills that specific role.

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

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.