intermediate~4h

Terraform Modules

Packaging resources into a reusable module, composing modules together, choosing between the public registry and writing your own, and a worked example building a simple VPC module.

Learning objectives

  • Intermediate: Write a reusable module that takes inputs via variables and exposes results via outputs.
  • Intermediate: Compose multiple modules together into a larger configuration.
  • Advanced: Decide when to use a public registry module versus writing a custom one, and build a simple VPC module as a worked example.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.

Terraform Modules

Next Step

Continue to Terraform Workspaces and Environments →← Back to all Terraform: Infrastructure as Code chapters