What is Module (Terraform)?
A reusable container of Terraform configuration that encapsulates a set of resources.
A Terraform Module is a container for multiple resources that are used together. Modules allow you to encapsulate infrastructure patterns — an 'ec2-web-server' module might create an EC2 instance, security group, IAM role, and EIP together. Modules have input variables, output values, and a clear interface. The Terraform Registry hosts thousands of community modules (VPC, EKS, RDS). Root module is your main working directory; child modules are called from it.
Related Terms
More IaC Terms
Ansible
Agentless configuration management and automation tool using YAML playbooks.
Crossplane
A Kubernetes-based framework for managing cloud infrastructure using K8s APIs.
Infrastructure as Code (IaC)
Managing and provisioning infrastructure through machine-readable configuration files.
OpenTofu
The open-source fork of Terraform maintained by the Linux Foundation.
Pulumi
An infrastructure as code tool using general-purpose programming languages instead of DSLs.
Terraform
An open-source IaC tool for provisioning and managing infrastructure across cloud providers.
Test your knowledge of Module (Terraform) and 130 other DevOps concepts