Interview Prep/Terraform/Variables, Locals, Outputs and Types

How do you document variables and outputs for a module?

BeginnerConceptVariables, Locals, Outputs and Types
Answer

Always add description to each, and generate the README table with terraform-docs markdown table ., ideally from a pre-commit hook so docs never go stale. Good descriptions state units, allowed values and defaults' meaning.

All Terraform questions Roadmap: Terraform

More on Variables, Locals, Outputs and Types