Question 1 · choose 2
After an outage, an auditor asks who changed a load balancer's listener port, when, and why. The team manages the load balancer with Terraform and keeps its configuration in Git, with changes merged through reviewed pull requests. Which two sources answer the auditor? (Choose TWO.)
- AThe state file keeps a full history of every attribute value and the user who set it
- BThe configuration's commit history shows the change, its author, date and reason
- CThe provider writes the Terraform user name into a tag on every resource it changes
- DTerraform keeps a log of every plan in the .terraform directory for later audits
- EThe pull request that introduced the change, with its review and approval
Show the answer and why
AThe state file keeps a full history of every attribute value and the user who set it
Incorrect
State records the current mapping to real objects; it is not an authorship log of configuration changes.
BThe configuration's commit history shows the change, its author, date and reason
Correct
Because the configuration is a file you can version, version control keeps who changed it, when, and the reason in the commit and its review.
CThe provider writes the Terraform user name into a tag on every resource it changes
Incorrect
Providers do not add authorship tags by themselves; any tags come from the configuration.
DTerraform keeps a log of every plan in the .terraform directory for later audits
Incorrect
The .terraform directory holds the working directory's providers, modules and backend settings, not an audit trail.
EThe pull request that introduced the change, with its review and approval
Correct
Teams review configuration changes alongside pull requests, so the pull request records who reviewed and approved the change.
Configuration files in version control give infrastructure the same history as application code: every change has an author, a time, a reason and, usually, a review.
HashiCorp documentation
- Purpose of Terraform state (why state is required) (opens in a new tab)
- What is Infrastructure as Code with Terraform? (IaC versus manual changes, declarative language) (opens in a new tab)
- What is Terraform? (declarative files, plan and approval, state, resource graph, modules) (opens in a new tab)
- Providers overview (what providers do, where they come from, how they are installed) (opens in a new tab)
- Initializing working directories (.terraform directory, reinitializing) (opens in a new tab)
- The core Terraform workflow (write, plan, apply for individuals, teams and HCP Terraform) (opens in a new tab)