Terraform Module is a reusable Terraform configuration package grouping resources, variables, outputs, and architecture logic.
Simple definition
Terraform Module is a reusable Terraform configuration package grouping resources, variables, outputs, and architecture logic. It belongs to the Cloud / DevOps vocabulary and is useful when reading architecture diagrams, product documentation, logs, or administration procedures.
What is it used for?
Its main purpose is to standardize infrastructure components and avoid copying the same resources across projects. The practical value depends on the surrounding architecture, security model, and operational requirements.
How does it work?
A module is called from a parent module with inputs and exposes outputs. It can be local, versioned in Git, or published in a registry.
Key points
- Scope: A reusable Terraform configuration package grouping resources, variables, outputs, and architecture logic.
- Operational goal: Standardize infrastructure components and avoid copying the same resources across projects.
- Implementation: A module is called from a parent module with inputs and exposes outputs. It can be local, versioned in Git, or published in a registry.
Points to watch
Protect state, pin versions, and review plans; IaC automation can propagate a configuration error very quickly.
In short
Terraform Module = a reusable Terraform configuration package grouping resources, variables, outputs, and architecture logic. Use it when you need to standardize infrastructure components and avoid copying the same resources across projects.