Show answerHide answer
Correct answer: A, D Lets you version, reuse, and share infrastructure configurationReduces risk of operator error
Explanation
Explanation:Infrastructure as Code (IaC) is a fundamental concept in modern DevOps and cloud engineering, enabling teams to define, provision, and manage infrastructure through machine-readable configuration files rather than manual steps in a graphical user interface (GUI). Terraform is a leading IaC tool by HashiCorp, and the advantages it provides go far beyond convenience — it brings consistency, automation, and reliability to infrastructure operations.
The two main advantages of using Infrastructure as Code (IaC) compared to GUI-based provisioning are:
A. Lets you version, reuse, and share infrastructure configuration
One of the biggest benefits of IaC tools like Terraform is version control. When infrastructure is defined in code, you can store that code in version control systems such as Git, just like application code. This allows teams to track changes, review history, and roll back to previous configurations if needed. In a GUI-based setup, such tracking is either impossible or extremely limited since actions are often performed manually through clicks, with no audit trail or code history.
In addition to versioning, IaC makes it possible to reuse and share configurations. Terraform allows you to modularize your infrastructure by creating modules—reusable building blocks for common infrastructure patterns. These modules can be shared across teams, organizations, or even the public Terraform Registry, ensuring consistency and reducing duplication of effort.
For instance, instead of manually creating a VPC, subnets, and security groups through a GUI every time, you can define a reusable module that provisions them in a standardized way. This not only accelerates provisioning but also enforces best practices across deployments.
Thus, IaC enables collaboration, automation, and standardization, all of which are difficult to achieve with manual GUI-based methods.
D. Reduces risk of operator error
Another major advantage of IaC is the reduction of human error. Manual configuration via a GUI often involves repetitive clicking, form-filling, and navigating multiple pages—each step introducing a chance for mistakes such as selecting the wrong instance type, misconfiguring a security group, or deploying to the wrong region.
In contrast, IaC allows you to codify infrastructure definitions, so the same configuration can be applied repeatedly and consistently. The process becomes automated, predictable, and testable. Terraform’s plan command (terraform plan) shows exactly what changes will be made before they are applied, allowing you to verify configurations and detect mistakes early.
Once your infrastructure code is peer-reviewed and tested, you can confidently apply it across multiple environments—development, staging, and production—without introducing inconsistencies. This drastically reduces the risk of manual misconfigurations that can lead to outages, security gaps, or cost overruns.
By integrating Terraform with CI/CD pipelines, organizations can further automate validation, testing, and deployment of infrastructure, effectively eliminating the need for manual steps altogether.
Why the Other Options Are Incorrect
B. Provisions the same resources at a lower cost
IaC does not inherently lower the cost of resources. The cost of infrastructure is determined by the cloud provider and the type of resources provisioned, not by whether they were created using Terraform or a GUI. IaC may indirectly reduce cost through efficiency and automation, but not by changing resource pricing.
C. Secures your credentials
IaC itself does not secure credentials; instead, credential management depends on integrations with secure tools such as HashiCorp Vault, AWS IAM, or environment variables. Terraform can use these securely, but the IaC model alone does not guarantee credential protection. Therefore, this is not a direct advantage of IaC over GUI provisioning.
E. Prevents manual modifications to your resources
IaC does not inherently prevent manual changes. Users with sufficient permissions can still modify resources via the provider’s GUI or CLI. While Terraform can detect drift between configuration and actual state, it doesn’t block manual changes—it only reports them during terraform plan.
Reference:
According to HashiCorp’s documentation:
“Terraform allows you to version, reuse, and share your configurations, making it easier to automate and standardize your infrastructure.”
“Because infrastructure is defined in code, you can preview changes before applying them, reducing the risk of human error.”
Source:
Terraform — Infrastructure as Code Overview
Terraform Documentation: Command Line Interface (CLI)

