Overview - Module sources (local, registry, git)
What is it?
In Terraform, modules are reusable pieces of configuration that help organize and share infrastructure code. Module sources tell Terraform where to find these modules. They can be stored locally on your computer, in a public or private registry, or in a Git repository. This lets you use the same module code in different projects easily.
Why it matters
Without module sources, you would have to copy and paste the same infrastructure code everywhere, making it hard to maintain and update. Module sources solve this by letting you reuse and share code safely and efficiently. This saves time, reduces errors, and helps teams work together better.
Where it fits
Before learning module sources, you should understand basic Terraform configuration and how modules work conceptually. After this, you can learn about module versioning, publishing modules to registries, and advanced module composition techniques.