You are tasked with making a change to an infrastructure stack running in a public cloud using HCP Terraform/Terraform Cloud. Which pattern follows IaC best practices?
A.
Make the change via the public cloud API endpoint.
B.
Submit a pull request and wait for an approved merge of the proposed changes.
C.
Clone the repository containing your infrastructure code and then run the code.
D.
Use the public cloud console to make the change after approval.
E.
Make the change programmatically via the cloud CLI.
Rationale for Correct Answer (B):IaC best practice is to manage infrastructure through version-controlled code. Changes should be reviewed and approved (via PRs), ensuring collaboration, traceability, and automation.
Analysis of Incorrect Options:
A, D, E: Making direct/manual changes bypasses IaC practices and causes drift.
C: Running code without PR review skips collaboration and approval.
Key Concept:Infrastructure as Code emphasizes version control + peer review + automation.
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit