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 →
- Deploy HCP Terraform agents inside the VPC, outbound-only to HCP.
- Create an agent pool and set the workspace's execution mode to "Agent".
- 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.
More on Pipelines Terraform Cloud and OpenTofu
Build a basic GitHub Actions pipeline: plan on pull request, apply on merge to main.BeginnerReviewers can't read raw plan logs. How do you present the plan in the PR?IntermediateTwo PRs merge close together and both apply to the same stack. What prevents trouble?IntermediateHow do you add a manual approval before prod applies?IntermediateCompare Atlantis, HCP Terraform and a hand-built GitHub Actions pipeline.IntermediateA saved plan was approved yesterday and apply fails because main changed. How do you avoid dead approvals?Intermediate