nerdexam
HashiCorpHashiCorp

TA-002-P · Question #383

TA-002-P Question #383: Real Exam Question with Answer & Explanation

The correct answer is C: Submit a pull request and wait for an approved merge of the proposed changes. IaC best practices for changing infrastructure involve using version control workflows, such as submitting a pull request, to ensure changes are reviewed, approved, and tracked.

Understand infrastructure as code (IaC) concepts

Question

As a member of an operations team that uses infrastructure as code (laC) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?

Options

  • AMake the change via the public cloud API endpoint
  • BMake the change programmatically via the public cloud CLI
  • CSubmit a pull request and wait for an approved merge of the proposed changes
  • DUse the public cloud console to make the change after a database record has been approved
  • EClone the repository containing your infrastructure code and then run the code

Explanation

IaC best practices for changing infrastructure involve using version control workflows, such as submitting a pull request, to ensure changes are reviewed, approved, and tracked.

Common mistakes.

  • A. Making changes directly via the API endpoint bypasses the IaC code and version control, leading to configuration drift.
  • B. Making changes directly via the CLI bypasses the IaC code and version control, leading to configuration drift.
  • D. While involving an approval process, directly using the cloud console or a database record still bypasses the IaC code management and version control system.
  • E. While cloning the repository and running the code is part of the process, the best practice for making changes involves a review and approval step, which a pull request facilitates, before the code is actually run against the infrastructure. Simply running it immediately upon cloning does not guarantee best practices without a review loop.

Concept tested. IaC change management best practices

Reference. https://developer.hashicorp.com/terraform/intro/use-cases/infrastructure-as-code

Topics

#IaC best practices#Version control#Change management#Code review

Community Discussion

No community discussion yet for this question.

Full TA-002-P PracticeBrowse All TA-002-P Questions