Build fluency with Terraform Cloud's workspace vocabulary — variables, remote state sharing between workspaces, run triggers for dependency chains, Sentinel policy sets, and the difference between VCS-driven and API-driven workspaces.
0 / 5 completed
1 / 5
What are workspace variables in Terraform Cloud?
Workspace variables in Terraform Cloud can be Terraform input variables or environment variables. Sensitive values are marked as sensitive and encrypted at rest. They take precedence over default values and .tfvars files, enabling the same configuration to behave differently in dev, staging, and prod workspaces.
2 / 5
How does remote state sharing work between Terraform Cloud workspaces?
Remote state sharing requires the producing workspace to set Remote state sharing to allow specific consumer workspaces (or all workspaces). The consumer references outputs using the tfe_outputs data source (preferred) or terraform_remote_state, enabling infrastructure layering without hard-coding resource IDs.
3 / 5
What are run triggers in Terraform Cloud?
Run triggers create producer-consumer relationships between workspaces. When the producer workspace applies successfully, Terraform Cloud automatically queues a plan in the consumer workspace. This replaces manually chained pipelines and ensures downstream infrastructure is refreshed after upstream changes.
4 / 5
What do policy sets in Terraform Cloud enforce?
Policy sets group Sentinel or OPA (Open Policy Agent) policies and apply them to selected workspaces or the entire organisation. Policies can be advisory (warn but allow) or hard mandatory (block the apply), enforcing security, compliance, and cost controls centrally.
5 / 5
What is the key difference between VCS-driven and API-driven Terraform Cloud workspaces?
VCS-driven workspaces connect to a repository and auto-trigger plan/apply on push or pull request. API-driven workspaces have no VCS connection and receive configuration uploads and run triggers via the Terraform Cloud API or CLI, giving full programmatic control suitable for complex CI/CD orchestration.