Configure and Use HCP Terraform Integration
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing HashiCorp Certified: Terraform Associate premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- Connecting the CLI with the cloud block
- Authenticating with terraform login
- VCS-driven workspaces
- Workspace variables, variable sets, and dynamic credentials
Getting provider credentials into a run
| Approach | Terraform variable (var.name) | Static environment variable | Dynamic provider credentials |
|---|---|---|---|
| Right place for provider auth? | No, the classic anti-pattern | Yes, the common approach | Yes, and stores no secret |
| Secret lifetime | Not applicable | Long-lived, stored in the workspace | Short-lived, only for the run |
| How the run gets it | As var.name in configuration | Exported into the run shell | Issued at run time via OIDC exchange |
| Rotation | Not applicable | Manual | Automatic, each run |
| Reuse across workspaces | A variable set | A variable set | A variable set of its env vars |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.