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
Storing infrastructure configuration in Git mainly provides which benefit?
- A history of changes that can be reviewed and reverted
- Automatic deployment without any tool
- Removal of the need for a state file
- 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.
Which are genuine advantages of managing infrastructure as code?
- Changes can be peer-reviewed before they are applied
- Provisioning can be automated and repeated
- Cloud bills drop to zero
- The configuration doubles as living documentation
- 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: 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.
