HashiCorp Certified: Terraform Associate — Question 339
As a member of an operations team that uses infrastructure as code (IaC) practices, you are tasked with making a change to an infrastructure stack running in a public cloud.
Which pattern would follow IaC best practices for making a change?
Answer options
- A. Clone the repository containing your infrastructure code and then run the code
- B. Use the public cloud console to make the change after a database record has been approved
- C. Make the change programmatically via the public cloud CLI
- D. Make the change via the public cloud API endpoint
- E. Submit a pull request and wait for an approved merge of the proposed changes
Correct answer: E
Explanation
The correct answer is E because submitting a pull request allows for code review and collaboration, ensuring that changes are properly vetted before being merged. This aligns with IaC best practices, which emphasize version control and collaboration. Options A, B, C, and D do not involve the necessary review and approval processes that ensure changes are safe and effective.