Modules are a way to organize Terraform code into re-usable chunks of IaC. Managing code for the complex infrastructure stack in a single go is not a good idea. This is for obvious reasons, the maintenance of the infrastructure itself may become a headache trying to figure out what caused what in lots of lines of IaC.

Thus, it makes sense to logically break down the infrastructure and wrap those logical parts into what is known as Modules. Modules represent a part of the infrastructure which is frequently (re)used together.