Bird
Raised Fist0
Terraformcloud~20 mins

Why IaC over manual provisioning in Terraform - Challenge Your Understanding

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
IaC Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why choose Infrastructure as Code (IaC) over manual provisioning?

Which of the following is the main advantage of using Infrastructure as Code (IaC) instead of manual provisioning?

AIaC allows automatic, repeatable, and consistent infrastructure deployment.
BManual provisioning is faster and less error-prone than IaC.
CManual provisioning automatically tracks infrastructure changes.
DIaC requires no knowledge of cloud services or configurations.
Attempts:
2 left
💡 Hint

Think about how IaC helps when you need to create the same setup multiple times.

✅ Best Practice
intermediate
2:00remaining
What is a key benefit of version controlling IaC scripts?

Why is it important to keep your Infrastructure as Code scripts in version control systems like Git?

AIt allows tracking and reverting infrastructure changes safely.
BIt automatically provisions infrastructure without manual approval.
CIt prevents any changes to infrastructure once deployed.
DIt makes infrastructure provisioning slower but more secure.
Attempts:
2 left
💡 Hint

Think about how you can undo mistakes or see history with code.

❓ Architecture
advanced
2:00remaining
How does IaC improve disaster recovery compared to manual provisioning?

Which option best explains how Infrastructure as Code supports faster disaster recovery?

AManual provisioning is faster because it requires no scripts to run.
BIaC scripts can be reused to quickly rebuild infrastructure after failure.
CIaC requires manual intervention to restore infrastructure state.
DManual provisioning automatically backs up infrastructure configurations.
Attempts:
2 left
💡 Hint

Consider how automation helps when you need to rebuild everything quickly.

❓ security
advanced
2:00remaining
What security advantage does IaC provide over manual provisioning?

Which security benefit is unique to Infrastructure as Code compared to manual setup?

AManual provisioning prevents unauthorized infrastructure changes.
BManual provisioning automatically encrypts all data by default.
CIaC removes the need for access controls on cloud resources.
DIaC allows automated security policy enforcement during deployment.
Attempts:
2 left
💡 Hint

Think about how code can enforce rules consistently every time.

❓ service_behavior
expert
2:00remaining
What happens if you manually change cloud resources outside of IaC management?

When you manually modify cloud resources that are managed by IaC, what is the typical outcome when you next run the IaC deployment?

AIaC will ignore manual changes and keep the current state as is.
BIaC will merge manual changes automatically without overwriting.
CIaC will detect the drift and revert changes to match the code.
DIaC will fail to run and produce an error about manual changes.
Attempts:
2 left
💡 Hint

Consider how IaC keeps infrastructure consistent with its code definitions.

Practice

(1/5)
1. Why is Infrastructure as Code (IaC) preferred over manual cloud provisioning?
easy
A. Manual provisioning tracks changes automatically.
B. Manual provisioning is faster for large-scale deployments.
C. IaC requires no knowledge of cloud services.
D. IaC automates setup, saving time and reducing human errors.

Solution

  1. Step 1: Understand automation benefits of IaC

    IaC automates cloud setup, which reduces manual work and human mistakes.
  2. Step 2: Compare manual provisioning drawbacks

    Manual provisioning is slower and prone to errors, especially at scale.
  3. Final Answer:

    IaC automates setup, saving time and reducing human errors. -> Option D
  4. Quick Check:

    Automation = IaC advantage [OK]
Hint: IaC automates and reduces errors, unlike manual steps [OK]
Common Mistakes:
  • Thinking manual is faster for big setups
  • Believing IaC needs no cloud knowledge
  • Assuming manual tracks changes automatically
2. Which Terraform command applies your infrastructure code to create resources?
easy
A. terraform apply
B. terraform plan
C. terraform init
D. terraform destroy

Solution

  1. Step 1: Identify command to create resources

    terraform apply runs the code and creates or updates infrastructure.
  2. Step 2: Differentiate from other commands

    terraform plan shows changes, init sets up, destroy deletes resources.
  3. Final Answer:

    terraform apply -> Option A
  4. Quick Check:

    Apply = create/update resources [OK]
Hint: Apply means execute changes to infrastructure [OK]
Common Mistakes:
  • Confusing plan with apply
  • Using init to create resources
  • Destroying instead of applying
3. Given this Terraform snippet, what is the main benefit of using it instead of manual setup?
resource "aws_instance" "web" {
  ami           = "ami-123456"
  instance_type = "t2.micro"
}
medium
A. It automatically tracks and applies changes to the instance.
B. It requires manual steps to launch the instance.
C. It disables version control for infrastructure.
D. It prevents reuse of the configuration.

Solution

  1. Step 1: Understand Terraform resource block

    This block defines an AWS instance that Terraform can create and manage automatically.
  2. Step 2: Compare with manual setup

    Manual setup requires clicking or scripting outside Terraform, no automatic tracking or updates.
  3. Final Answer:

    It automatically tracks and applies changes to the instance. -> Option A
  4. Quick Check:

    Automatic tracking = IaC benefit [OK]
Hint: Terraform tracks changes; manual does not [OK]
Common Mistakes:
  • Thinking manual steps are needed with Terraform
  • Believing Terraform disables version control
  • Assuming config cannot be reused
4. You wrote Terraform code but it fails to update your cloud resources. What is a common reason for this?
medium
A. Manual provisioning is required after every change.
B. You forgot to run terraform apply after changes.
C. Terraform does not support updating resources.
D. Terraform automatically updates without commands.

Solution

  1. Step 1: Identify Terraform workflow

    After editing code, you must run terraform apply to update resources.
  2. Step 2: Eliminate incorrect options

    Terraform supports updates but needs apply; manual provisioning is not needed after changes; updates are not automatic without commands.
  3. Final Answer:

    You forgot to run terraform apply after changes. -> Option B
  4. Quick Check:

    Apply runs updates [OK]
Hint: Always run terraform apply to update resources [OK]
Common Mistakes:
  • Assuming Terraform updates automatically
  • Thinking manual steps are needed after code changes
  • Believing Terraform cannot update resources
5. How does using Terraform as IaC help teams fix problems faster compared to manual provisioning?
hard
A. Manual provisioning is faster to fix because it uses GUIs.
B. Manual provisioning automatically logs all changes for easy fixes.
C. Terraform code is reusable and tracks changes, making troubleshooting easier.
D. Terraform requires no collaboration, so fewer errors occur.

Solution

  1. Step 1: Understand Terraform's tracking and reusability

    Terraform stores infrastructure as code, enabling version control and easy sharing.
  2. Step 2: Compare with manual provisioning challenges

    Manual provisioning lacks automatic tracking and is harder to reproduce or fix consistently.
  3. Final Answer:

    Terraform code is reusable and tracks changes, making troubleshooting easier. -> Option C
  4. Quick Check:

    Tracking + reuse = faster fixes [OK]
Hint: Code tracks changes and is reusable for quick fixes [OK]
Common Mistakes:
  • Believing manual provisioning logs changes automatically
  • Thinking Terraform needs no teamwork
  • Assuming GUIs are always faster to fix problems