DELAPARRA
Index
Color
NL
Category: Terraform

module

Explained by Updated

What is module?

module: A reusable package of resources called from another configuration. The unit of composition and reuse in Terraform. A module in Terraform is a reusable package of resources. You call it from your configuration with inputs, and it creates a coherent set of infrastructure, such as a complete network or a database with its backups and firewall rules.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about module

How is module used in practice?

Modules let you define a pattern once and use it in every environment. Staging and production can call the same module with different sizes, so they stay consistent.

What should you keep in mind with module?

Public modules from the Terraform Registry can save a lot of work for common setups, but pin their version and read what they create. For your own modules, keep the inputs small and the purpose clear. A module with fifty variables is often a sign it tries to cover too many cases, and copying a little configuration is sometimes simpler than an over-general module.

What does an example of module look like?

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

At a glance

CategoryTerraform
Explained by
Updated

More Terraform terms

All terms starting with M

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.