Terraform-Associate-004 practice question 24 of 35

Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Full set: 360 questions
Answer options
A: Lets you version, reuse, and share infrastructure configuration Correct answer
B: Provisions the same resources at a lower cost
C: Secures your credentials
D: Reduces risk of operator error Correct answer
E: Prevents manual modifications to your resources
Correct Answer:
A. Lets you version, reuse, and share infrastructure configuration; D. Reduces risk of operator error
Explanation

Infrastructure as Code (IaC) treats infrastructure definitions as software artifacts. This allows configurations to be stored in version control systems (like Git), enabling tracking, collaboration, sharing, and reuse of code through modularization. This directly corresponds to option A. Furthermore, by codifying the provisioning process, IaC automates the creation and management of infrastructure. This automation ensures consistency and repeatability, significantly reducing the risk of human error that is common with manual, click-based operations in a graphical user interface (GUI). This supports option D.

Why Incorrect

B. Provisions the same resources at a lower cost IaC does not change the unit price of cloud resources. While it can help manage costs by enabling easy teardown of environments, it doesn't inherently make the resources themselves cheaper.
C. Secures your credentials IaC requires credentials to operate, and while there are secure ways to manage them, using IaC does not automatically make credential handling more secure than using a GUI.
E. Prevents manual modifications to your resources IaC does not prevent out-of-band changes. A user with appropriate permissions can still manually modify resources, leading to configuration drift, which Terraform can detect but not prevent.

References

1. HashiCorp Learn - What is Infrastructure as Code?: "IaC helps you automate your infrastructure deployment... This automation reduces the risk of human error... Since your infrastructure is now code, you can version, reuse, and share your configurations." This directly supports options A and D.

Source: HashiCorp Learn, "What is Infrastructure as Code?", Section: "Why use infrastructure as code?".

2. HashiCorp Terraform Documentation - The Tao of Terraform: "Automation reduces the chance for human error... Infrastructure as code allows for infrastructure to be versioned, and for those versions to be tested." This reinforces the concepts of reducing error (D) and versioning (A).

Source: HashiCorp Terraform Documentation, "The Tao of Terraform", Principles: "Automation" and "Version Control".

3. HashiCorp Terraform Documentation - Infrastructure as Code in a Private or Public Cloud: "Infrastructure as code has several key benefits over manual infrastructure management... Reduced risk: IaC reduces the risk of human error and improves consistency." This explicitly supports option D.

Source: HashiCorp Terraform Documentation, "Infrastructure as Code in a Private or Public Cloud", Section: "Benefits of infrastructure as code".

Scroll to Top