Bitzu

Terraform Associate 004 ยท Infrastructure as Code basics

Advantages of IaC patterns

Repeatability, version control and review, automation, drift reduction, documentation value, consistency across environments (1b).

Key points

  • Repeatable builds, version control and peer review, automation, less drift, configuration that documents itself, and consistent environments (dev, test, prod built from the same code).

Source: https://developer.hashicorp.com/terraform/intro

Practice questions

Single choice

Storing infrastructure configuration in Git mainly provides which benefit?

  1. A history of changes that can be reviewed and reverted
  2. Automatic deployment without any tool
  3. Removal of the need for a state file
  4. Faster network speed between regions
Show answer

Answer: A. A history of changes that can be reviewed and reverted

Version control gives history, review and rollback of infrastructure changes. It does not by itself deploy anything or remove the need for state.

Select all that apply

Which are genuine advantages of managing infrastructure as code?

  1. Changes can be peer-reviewed before they are applied
  2. Provisioning can be automated and repeated
  3. Cloud bills drop to zero
  4. The configuration doubles as living documentation
  5. Mistakes in code become impossible
Show answer

Answer: A. Changes can be peer-reviewed before they are applied, B. Provisioning can be automated and repeated, D. The configuration doubles as living documentation

Review via pull requests, repeatable automation and self-documenting config are real gains. IaC does not guarantee zero cost or make mistakes impossible.

True or false

True or false: once infrastructure is defined as code, manual edits in the cloud console can no longer cause drift.

Show answer

Answer: False

False. Anyone with console access can still change resources by hand; IaC makes drift detectable and correctable, not impossible.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More Terraform Associate 004 topics in this module