Interview Prep/Terraform/State Backends and Workspaces

In HCP Terraform, how do you manage 40 workspaces that need the same AWS credentials and tags?

IntermediateScenarioState Backends and Workspaces
Answer

Situation read → Repeated variables across workspaces.

What I'd do →

  1. Create a variable set with the shared environment variables (preferably dynamic provider credentials via OIDC, not static keys).
  2. Apply the set to a project or to all workspaces.
  3. Keep workspace-specific values on the workspace.

Why → One place to rotate or change, and no keys copied by hand.

Interview tip → Dynamic credentials give per-run short-lived tokens.

All Terraform questions Roadmap: Terraform in production

More on State Backends and Workspaces