Which TWO of the following are benefits of using Terraform's infrastructure as code approach?
Trap 1: Terraform automatically scales resources based on load.
While Terraform can define and provision the underlying infrastructure components that enable auto-scaling, such as AWS Auto Scaling Groups or Azure Scale Sets, Terraform itself does not provide the real-time monitoring or dynamic decision-making logic required for automatic scaling. Its role is to orchestrate the setup of these scaling mechanisms provided by cloud providers. Once deployed, the cloud provider's services, not Terraform, perform the actual scaling operations based on configured metrics and policies.
Trap 2: Manual configuration of servers is eliminated entirely.
Terraform significantly reduces the necessity for manual configuration by defining infrastructure declaratively, managing the lifecycle of resources from creation to destruction. However, it primarily focuses on the infrastructure layer. Post-provisioning tasks, such as installing specific application dependencies, running initial setup scripts within an operating system, or managing application-level configurations, often still require dedicated configuration management tools like Ansible or Chef, or custom scripts, which might involve some initial manual setup or oversight.
Trap 3: Terraform provides real-time monitoring of infrastructure health.
Terraform's core function is the provisioning, management, and orchestration of infrastructure resources based on a desired state. It does not include capabilities for real-time monitoring, alerting, or logging of operational metrics suchs as CPU utilization, network traffic, or application performance. These critical functions are typically handled by specialized monitoring solutions like Prometheus, Grafana, Datadog, or cloud-native services such as AWS CloudWatch, Azure Monitor, or Google Cloud Monitoring, which operate independently of Terraform's deployment lifecycle.
- A
Provisioning can be automated and repeated consistently across environments.
Terraform utilizes declarative configuration files to define infrastructure, enabling the execution of `terraform apply` to provision resources without manual intervention. This automation ensures that the same infrastructure setup can be consistently deployed across development, staging, and production environments, significantly reducing configuration drift. This inherent repeatability is crucial for achieving reliable deployments, facilitating rapid environment recreation, and supporting robust disaster recovery strategies.
- B
Infrastructure can be version-controlled and reviewed like application code.
Terraform configurations are written in human-readable formats like HashiCorp Configuration Language (HCL) or JSON, making them text-based files. These files can be stored and managed within version control systems such as Git, providing a complete, auditable history of all infrastructure changes. This practice fosters collaborative development, enables thorough code reviews, and allows for easy rollback to previous infrastructure states, mirroring established application development workflows.
- C
Terraform automatically scales resources based on load.
Why wrong: While Terraform can define and provision the underlying infrastructure components that enable auto-scaling, such as AWS Auto Scaling Groups or Azure Scale Sets, Terraform itself does not provide the real-time monitoring or dynamic decision-making logic required for automatic scaling. Its role is to orchestrate the setup of these scaling mechanisms provided by cloud providers. Once deployed, the cloud provider's services, not Terraform, perform the actual scaling operations based on configured metrics and policies.
- D
Manual configuration of servers is eliminated entirely.
Why wrong: Terraform significantly reduces the necessity for manual configuration by defining infrastructure declaratively, managing the lifecycle of resources from creation to destruction. However, it primarily focuses on the infrastructure layer. Post-provisioning tasks, such as installing specific application dependencies, running initial setup scripts within an operating system, or managing application-level configurations, often still require dedicated configuration management tools like Ansible or Chef, or custom scripts, which might involve some initial manual setup or oversight.
- E
Terraform provides real-time monitoring of infrastructure health.
Why wrong: Terraform's core function is the provisioning, management, and orchestration of infrastructure resources based on a desired state. It does not include capabilities for real-time monitoring, alerting, or logging of operational metrics suchs as CPU utilization, network traffic, or application performance. These critical functions are typically handled by specialized monitoring solutions like Prometheus, Grafana, Datadog, or cloud-native services such as AWS CloudWatch, Azure Monitor, or Google Cloud Monitoring, which operate independently of Terraform's deployment lifecycle.