thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Intermediate

Terraform Module

A reusable container of Terraform resources; every configuration is a root module that can call child modules.

Definition

Modules accept input variables and expose outputs, enabling standardized building blocks. They can be sourced locally, from Git, or from public and private registries with version constraints.

Example

module "vpc" { source = "terraform-aws-modules/vpc/aws" version = "5.8.1" cidr = "10.0.0.0/16" }

Exam tip

Child module outputs must be explicitly declared to be used by the caller (module.vpc.vpc_id).

Related terms