Which method demonstrates infrastructure as code when provisioning resources into a public cloud?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

Which method demonstrates infrastructure as code when provisioning resources into a public cloud?

Explanation:
Infrastructure as code means describing the cloud setup in code that can be saved, versioned, and executed to create or update resources automatically. A script containing a series of public cloud CLI commands fits this idea best because it is itself code, can be stored in a repository, parameterized, and run to reproduce the exact infrastructure configuration. Manual curl commands run from a terminal are ad-hoc and not typically versioned or reusable. A sequence of REST requests could be automated, but without a structured approach or configuration management tooling, it isn’t the clearest example of codified infrastructure. Entering commands into a cloud console is explicitly manual and not something you can version or reuse reliably. So, the script with CLI commands demonstrates infrastructure as code by providing a reproducible, codified way to provision resources.

Infrastructure as code means describing the cloud setup in code that can be saved, versioned, and executed to create or update resources automatically. A script containing a series of public cloud CLI commands fits this idea best because it is itself code, can be stored in a repository, parameterized, and run to reproduce the exact infrastructure configuration.

Manual curl commands run from a terminal are ad-hoc and not typically versioned or reusable. A sequence of REST requests could be automated, but without a structured approach or configuration management tooling, it isn’t the clearest example of codified infrastructure. Entering commands into a cloud console is explicitly manual and not something you can version or reuse reliably.

So, the script with CLI commands demonstrates infrastructure as code by providing a reproducible, codified way to provision resources.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy