Overview - Module inputs (variables)
What is it?
Module inputs, also called variables, are named placeholders in Terraform modules that let you pass data from outside into the module. They allow you to customize how a module behaves without changing its code. Think of them as questions a module asks before it starts working, so it knows what to do.
Why it matters
Without module inputs, every time you want to reuse a module, you'd have to rewrite or copy it for each different use case. This would be slow, error-prone, and hard to maintain. Module inputs let you write a module once and use it many times with different settings, saving time and reducing mistakes.
Where it fits
Before learning module inputs, you should understand basic Terraform concepts like resources and modules. After mastering inputs, you can learn about outputs, module composition, and advanced features like variable validation and dynamic blocks.