QuestionQ23

HCP Terraform

Your team uses HCP Terraform to manage its infrastructure. You need to change an infrastructure stack that runs in a public cloud.

Which pattern best follows Infrastructure as Code practices when making the change?

  • A Make the change via the public cloud API endpoint.
  • B Use the public cloud console to make the change.
  • C Run the public cloud CLI tool to make the change.
  • D Submit a pull request and wait for an approved merge of the change.
  • E Clone the repository containing your infrastructure code and then run the code.
Explanation

Infrastructure configuration should remain under version control and be changed through a reviewed pull request. HCP Terraform can run speculative plans for pull requests and initiates a run after the change is merged, preserving review, auditability, and the repository as the source of truth. Direct cloud-side changes can create configuration drift.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!