IaC Documentation Language — Writing About Infrastructure Code
Practice the vocabulary for documenting Terraform modules, Ansible roles, and IaC design decisions.
0 / 5 completed
1 / 5
You are writing a README for a Terraform module. What should the Inputs section describe?
Terraform module README Inputs sections document each variable: name, type, description, default, and required/optional status.
2 / 5
A colleague asks you to document the module's outputs. What should this section contain?
Module outputs are values other configurations can reference — e.g., a VPC module outputs the VPC ID so other modules can use it.
3 / 5
What should a good IaC pull request description include?
IaC PRs should explain what infrastructure changes, why, include a plan summary, and flag any destructive changes or dependencies.
4 / 5
You need to write a comment explaining why a resource has a specific configuration. Which comment is most useful?
Useful IaC comments explain the WHY (compliance requirement, architectural decision) not the WHAT (which is already visible in the code).
5 / 5
A team is discussing whether to use count or for_each to create multiple EC2 instances. Which statement best explains the difference?
for_each is preferred when instances have distinct identities (e.g., by environment or region) because it avoids index-shift issues when items are removed.