In HCP Terraform, what is the primary role of a project in relation to workspaces?
- AA project is a single unit of infrastructure that always maps to exactly one state file shared by every workspace.
- BA project is a container that groups related workspaces so access permissions and organisation can be managed together. Correct
- CA project is a version-controlled directory of Terraform configuration that HCP Terraform executes on each run.
- DA project is a saved set of input variables that workspaces import at plan time to avoid duplication.
Why A is wrong: This confuses a project with a workspace; state files belong to individual workspaces, and a project can contain many workspaces each with its own state, so it is wrong.
Why B is correct: Projects in HCP Terraform group workspaces to organise them and to scope team access at the project level, which is exactly their purpose.
Why C is wrong: Configuration lives in a connected VCS repository or uploaded files, not in a project, so describing a project as a config directory misstates the concept.
Why D is wrong: Shared variable reuse is handled by variable sets, not projects, so this plausibly-worded option describes the wrong feature.