Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 244 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 244
Topic #: 1
[All Terraform Associate Questions]

Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

  • A. curl commands manually run from a terminal
  • B. A sequence of REST requests you pass to a public cloud API endpoint
  • C. A script that contains a series of public cloud CLI commands
  • D. A series of commands you enter into a public cloud console
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
amoyano
Highly Voted 1 year, 4 months ago
Selected Answer: B
you declare your desired config and then Terraform performs a sequence of API calls to your cloud provider. It's not a script with CLI commands.
upvoted 6 times
chaoscreater
5 months, 3 weeks ago
Wrong. You can use pipelines to execute CLI commands. In fact, you can execute Powershell scripts etc in Terraform itself. The answer can't be B because it's not in code. Question is asking about infrastructure as code.
upvoted 1 times
sco_murad
1 month ago
read about declarative and imperative automation and you will understand that you are wrong
upvoted 1 times
...
...
...
6169891
Most Recent 3 weeks, 1 day ago
Selected Answer: C
I select C because B can use rest requests stored in different files an thoses requests could be inadequate pulled together, in C the cli commands are stored in a script so this confirme that they have been tested together
upvoted 1 times
...
sco_murad
1 month ago
Selected Answer: B
it works over REST API
upvoted 1 times
...
Kriegs
2 months, 2 weeks ago
Selected Answer: C
I'd argue that both B & C could be correct but I'd go with C on an exam.
upvoted 1 times
...
8876ca1
5 months ago
Selected Answer: C
C. A script that contains a series of public cloud CLI commands: This is correct. A script (e.g., using Bash, PowerShell, or another scripting language) that automates the provisioning of resources aligns with the principles of IaC. It is automated, repeatable, and can be version-controlled. Atte ChatGPT 4o
upvoted 2 times
...
TheShantyman
5 months, 3 weeks ago
Selected Answer: C
C is correct. It is the only option that persists the commands being run so that they can be re-used again later. All other options will need to be manually executed again if you wanted to recreate the infra config.
upvoted 1 times
...
Roman_Rabodzey
8 months, 1 week ago
Selected Answer: B
B is correct. For Azure Cloud, you provide an API version of a resource you are going to deploy.
upvoted 2 times
...
iamabhi
8 months, 3 weeks ago
Selected Answer: C The concept of infrastructure as code (IaC) is to define and manage infrastructure using code, rather than manual processes or GUI tools. A script that contains a series of public cloud CLI commands is an example of IaC, because it uses code to provision resources into a public cloud. The other options are not examples of IaC, because they involve manual or interactive actions, such as running curl commands, sending REST requests, or entering commands into a console.Reference= [Introduction to Infrastructure as Code with Terraform] and [Infrastructure as Code]
upvoted 1 times
...
ae07177
11 months, 1 week ago
Correct Answer is B. Hashicorp Documentation Says it's not Step C, so it must be B. IaC Makes Infrastructure More Reliable IaC makes changes idempotent, consistent, repeatable, and predictable. Without IaC, scaling up infrastructure to meet increased demand may require an operator to remotely connect to each machine and then manually provision and configure many servers by executing a series of commands/scripts. https://www.hashicorp.com/blog/infrastructure-as-code-in-a-private-or-public-cloud
upvoted 2 times
...
Tronko86
1 year ago
Selected Answer: C
The method that demonstrates the concept of infrastructure as code when provisioning resources in a public cloud is: C. A script that contains a series of public cloud CLI commands Infrastructure as code (IaC) involves defining and provisioning infrastructure resources using code and scripts. In this case, using a script with CLI commands allows you to automate the provisioning process and manage infrastructure configurations programmatically. It provides the benefits of version control, repeatability, and automation, which are core principles of IaC.
upvoted 2 times
...
Pikopo
1 year, 1 month ago
B is correct in my opinion
upvoted 3 times
...
lotfi50
1 year, 4 months ago
Selected Answer: C
C. A script that contains a series of public cloud CLI commands
upvoted 1 times
...
seifskl
1 year, 4 months ago
Selected Answer: C
The correct answer is C. The idea behind Infrastructure as Code (IaC) is to write and execute code to define, deploy, and update infrastructure. If that infrastructure code is written in a high-level language, then it can be version controlled and audited, which has benefits for traditional software development practices, such as code review, continuous integration, and automated testing. Option C, where a script contains a series of public cloud CLI commands, best fits this concept. This script can be version controlled, reviewed, and executed consistently across environments, adhering to the principles of IaC. The other options are manual methods that do not adhere to the principles of IaC. They do not support versioning or auditing, are error-prone, and can't ensure consistency across multiple deployments.
upvoted 1 times
...
VSMu
1 year, 4 months ago
Selected Answer: C
I would answer C because script is a code in a file ( like bash script) that can be executed multiple times. It can be pushed to a source control repo and can be versioned. Calling commands directly whether they are through CLI, APIs or through Console cannot be repeated like a script.
upvoted 1 times
...
TafMuko
1 year, 4 months ago
Selected Answer: B
B makes more sense
upvoted 2 times
...
atiiii
1 year, 4 months ago
Doesn't B make more sense?
upvoted 2 times
...
Oleg_gol
1 year, 6 months ago
Selected Answer: C
C. A script that contains a series of public cloud CLI commands
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...