Terraform 004 HCP Terraform explained

Updated November 23, 2026

Objective 8 of the Terraform Associate (004) covers HCP Terraform, HashiCorp’s managed platform for running Terraform in a team. Its four sub-objectives are creating infrastructure with it (8a), collaboration and governance features (8b), organizing workspaces and projects (8c, new in 004) and configuring integrations (8d). Many candidates who study only the CLI under-prepare here, but it is a full objective of its own.

What HCP Terraform adds

The CLI runs on your machine and stores state wherever you tell it. HCP Terraform moves that into a shared service: remote state with locking and history, remote runs, shared variables, access control and policy checks. Teams typically connect it to version control so a pull request triggers a plan and a merge triggers an apply. The exact feature set and tier names change over time, so rely on HashiCorp’s documentation for specifics.

8a: Creating infrastructure

You can run Terraform from HCP Terraform in different workflows: connected to a version control repository, driven from the CLI using the cloud block, or driven through an API. Runs happen on managed workers, so credentials are stored as workspace or variable set values instead of on laptops. A run goes through plan, optional policy checks and apply, with approval where required.

8b: Collaboration and governance

  • Access control through teams and permissions.
  • Shared state with locking and a history of versions.
  • Variable sets that supply values to many workspaces.
  • Policy enforcement that can block a plan which breaks a rule.
  • Private registry for modules and providers inside the organization.
  • Run tasks that call external services during a run.

8c: Workspaces and projects

An HCP Terraform workspace holds the configuration source, variables, state and run history for one set of infrastructure. This is different from a CLI workspace, which is only a way to keep multiple state files for one configuration. A project groups workspaces inside an organization, so that you can manage access and settings for related workspaces together.

ConceptScope
OrganizationTop level, holds teams, projects and the registry
ProjectA group of related workspaces
WorkspaceOne configuration, its variables, state and runs

8d: Integrations

Common integration points are version control providers for triggering runs, cloud credentials for provisioning, run tasks for third-party checks, notifications to chat or email and the API and CLI for automation. Know why each exists rather than every setting.

Typical traps

  • Treating a CLI workspace as the same as an HCP Terraform workspace.
  • Assuming runs use your laptop’s credentials when they run remotely.
  • Forgetting that policy checks run between plan and apply.

Sample questions

Question 1. A team wants every pull request to produce a plan automatically and merges to the main branch to trigger an apply. Which HCP Terraform workflow fits?

  • A. A private registry
  • B. A variable set
  • C. Local runs on a laptop
  • D. A version control driven workspace
Show answer

Answer: D

A version control driven workflow connects a workspace to a repository, so changes trigger runs automatically. A CLI-only workflow needs someone to run commands, and the registry and variable sets do not trigger runs.

Want more questions like this? Full Terraform 004 practice tests →

Question 2. Which statement correctly distinguishes an HCP Terraform workspace from a CLI workspace?

  • A. They are identical in features and scope
  • B. An HCP Terraform workspace holds config, variables, state and runs, while a CLI workspace is only a named state
  • C. A CLI workspace is the larger unit that contains projects
  • D. HCP Terraform workspaces do not store state
Show answer

Answer: B

An HCP Terraform workspace is the unit that holds configuration, variables, state and run history for a set of infrastructure. A CLI workspace is just another named state for the same configuration directory, so the two are not the same thing.

Want more questions like this? Full Terraform 004 practice tests →

Question 3. A company wants a rule that prevents any plan that opens a database to the public internet from being applied. Which HCP Terraform capability addresses this?

  • A. Policy enforcement on runs
  • B. Variable sets
  • C. Projects
  • D. Notifications
Show answer

Answer: A

Policy enforcement evaluates a plan against rules and can stop the run before apply. Variable sets share values, projects group workspaces, and notifications only tell people something happened.

Want more questions like this? Full Terraform 004 practice tests →

Next

Check your knowledge with the sample questions and decide if the exam is right for you in is it worth it.