Chapter 5 of 7 · HashiCorp Terraform Infrastructure Engineer Professional
Terraform Security and Governance
Secrets, rotation, pipeline identities, policy sets and risky changes.
- 3topics
- 15 minfast track
- 2diagrams and exhibits
Topics in this chapter
Take them in order, or jump to the one you need.
- 1Secrets, Ephemeral Values and RotationTerraform Professional (002): keep secrets out of state with ephemeral values and write-only arguments, protect state, and rotate…Diagram5 min
- 2Securing Pipeline Identities and AccessTerraform Professional (002): secure pipelines with dynamic provider credentials, scoped OIDC trust, team tokens and least…Diagram5 min
- 3Policy Rules and Risky ChangesTerraform Professional (002): layer core and project policy sets, pick enforcement levels, read dangerous plans and apply…5 min
About this chapter
What this chapter covers
Terraform Security and Governance covers how production teams keep secrets out of the wrong places, give pipelines only the access they need, enforce rules across an organization, and catch dangerous changes before they run.
The chapter has three parts: handling and rotating secrets, securing the identities a CI/CD pipeline uses, and combining policy rules with plan review and lifecycle safeguards.
Questions are single-answer and multiple-answer ("Pick the 2 correct responses below") multiple choice, mostly scenarios and configuration to read. There are no exhibits.
How the topics fit together
A run needs two kinds of trust: credentials to reach the cloud, and any secrets the configuration consumes. Governance then sits between plan and apply, where policy sets and human review decide whether the change may proceed.
- Secrets questions ask where a value ends up: output, plan or state.
- Rotation questions ask how a new secret reaches a resource, and what the next plan does.
- Identity questions ask which credential or token type a pipeline should use, and how to scope trust.
- Policy questions ask which enforcement level and scope fit a requirement.
- Risky change questions ask you to read a plan and choose the right safeguard.
For any secret scenario, first ask "does this value land in state?" The sensitive argument only hides output; ephemeral values and write-only arguments are what keep a value out of state and plan files.
How to use these pages
Each topic page has the same shape, so you can skim for what you need.
- What it is: the idea in plain words.
- How it works: the mechanism, with tables and examples.
- What to remember for the exam: the facts to memorize and how questions are phrased.
- Common mistakes: the classic traps.
- Check yourself: three questions to test your understanding.
Ready for more practice?
The full HashiCorp Terraform Infrastructure Engineer Professional question bank has 600 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by HashiCorp. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.