A team is adopting Terraform to manage infrastructure. One requirement is that all configuration changes must be reviewed and approved before being applied. The team wants to ensure that the Terraform state file reflects the actual deployed infrastructure at all times. Which practice should they implement to meet these requirements?
Trap 1: Store state locally and use a manual approval process outside of…
Manual approval outside Terraform is not integrated and local state is not shared.
Trap 2: Store state locally and use a shared network drive for team access.
Local state on a network drive can cause corruption and lacks locking.
Trap 3: Have each team member run terraform apply from their local machine…
Local apply bypasses review and risks inconsistent state.
- A
Store state locally and use a manual approval process outside of Terraform.
Why wrong: Manual approval outside Terraform is not integrated and local state is not shared.
- B
Store state remotely and use a version control system with pull requests to review changes before applying.
Remote state enables team collaboration and VCS with PRs enforces review.
- C
Store state locally and use a shared network drive for team access.
Why wrong: Local state on a network drive can cause corruption and lacks locking.
- D
Have each team member run terraform apply from their local machine after informal discussion.
Why wrong: Local apply bypasses review and risks inconsistent state.