Modules Introduction

This lesson will address why we created child folders in the last chapter and will cover Terraform modules.

We'll cover the following

Child folders#

In the last chapter, we learned about how Terraform handles files and folders in a project. You may have wondered what the purpose of creating child folders is if Terraform ignores them. It is because Terraform uses child folders to allow you to create modules.

Terraform uses child folders to create modules

Terraform module#

A module in Terraform is a mini Terraform project that can contain all of the same constructs as our main Terraform project (resources, data blocks, locals, etc.). Modules are useful as they allow us to define a reusable block of Terraform code of which we can have many instances in our main Terraform project.

Terraform modules allow us to define reusable blocks
🎉Quiz
Modules in Action
Mark as Completed
Report an Issue