HashiCorp - Terraform Associate Study Guide

    8: HCP Terraform

    This chapter walks through HCP Terraform, the hosted platform that runs Terraform plans and applies remotely while storing state, variables, and run history per workspace. It covers how to create infrastructure through the platform, the collaboration and governance surfaces (VCS-driven runs, Sentinel policy, the private registry), the workspace and project organization model, and the three integration workflows (CLI-driven, API-driven, VCS-driven) that an associate-level practitioner has to distinguish.

    Learning Objectives

    By the end of this chapter, you will be able to:

    • Use HCP Terraform to create infrastructure, including configuring the cloud block, authenticating the CLI, selecting an execution mode, and triggering remote runs from a working directory.
    • Describe the collaboration and governance features layered on top of the open-source CLI, including VCS-driven runs, Sentinel and OPA policy sets, the private module registry, run tasks, and team-based access control.
    • Organize workspaces inside projects and apply the right combination of variable sets, tags, execution modes, run triggers, and team permissions to each workspace.
    • Configure and use the three integration workflows (CLI-driven, API-driven, VCS-driven) and pick the right one for a given delivery pattern.

    Executive Summary

    • HCP Terraform is the renamed hosted product that was sold as Terraform Cloud; the cloud block, the terraform login flow, the workspaces, projects, agents, runs, state versions, and the REST API are the same surface under a new product name.
    • A workspace is the unit of state, variables, run history, and access control; a project groups workspaces and is the unit at which team permissions, policy sets, and variable sets attach.
    • Three run-trigger workflows exist: CLI-driven (an engineer runs terraform plan or apply locally and Terraform streams the run remotely), VCS-driven (a push or pull-request webhook triggers a run automatically), and API-driven (a CI system uploads a configuration version through the REST API). Each workflow has documented constraints on speculative plans, variable injection, and approval flow.
    • Governance hooks (Sentinel policies, OPA policies, run tasks, mandatory variable sets, run triggers between workspaces, and the private module registry) attach at the organization or project level so that workspaces inherit them without per-workspace duplication.

    Assumptions

    • The reader has worked through Chapters 1 through 7 and is fluent with the Write / Plan / Apply workflow, the backend block, state locking, modules, and the terraform_remote_state data source.
    • This chapter uses the name HCP Terraform throughout. Anywhere existing prose, screenshots, or older documentation says "Terraform Cloud," the meaning is the same product.
    • All examples target the hosted HCP Terraform service on app.terraform.io. Terraform Enterprise (the self-hosted edition) exposes the same workspace, project, run, and API model with a different hostname.
    • Pricing tiers (Free, Standard, Plus) and feature gating are summarised at the level the Associate exam requires. The exam does not test line-item SKU prices.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account
    4. Free with account
    5. Free with account