Interview Prep/Terraform/Pipelines Terraform Cloud and OpenTofu

Private resources (RDS in a VPC) can't be reached by HCP Terraform's public runners.

IntermediateScenarioPipelines Terraform Cloud and OpenTofu
Answer

Situation read → Providers like PostgreSQL or Vault need network access.

What I'd do →

  1. Deploy HCP Terraform agents inside the VPC, outbound-only to HCP.
  2. Create an agent pool and set the workspace's execution mode to "Agent".
  3. Run the agent as a container with a least-privilege role.

Why → Agents poll HCP over HTTPS, so you don't open inbound ports.

Interview tip → In GitHub Actions, the equivalent is a self-hosted runner in the VPC.

All Terraform questions Roadmap: Terraform in production

More on Pipelines Terraform Cloud and OpenTofu