public module
A reusable module published to the Terraform Registry, called by an address such as terraform-aws-modules/vpc/aws.
In more detail
The address is namespace, name and provider. A public module is code you choose to run, so review its source, inputs, outputs, providers, maintainers and changelog before adopting it, and pin its version. It belongs in your dependency inventory like a provider.
Example
module "network" {
source = "terraform-aws-modules/vpc/aws"
version = "5.0.0"
}Related terms
- Terraform Registry — HashiCorp's public website where providers and reusable modules are published, with the documentation for each.
- module source — The source argument of a module block, which says where to get the module: a local path such as ./modules/network, the registry, or a Git address.
- pinning — Fixing an exact version or digest of something you depend on so it cannot change without you noticing.
- software supply chain — Everything that goes into your software before it runs: base images, packages, build tools, CI systems and registries.
Taught in
- The Terraform Registry And Public Modules — Infrastructure as Code with Terraform
- Versioning And Pinning Modules — Infrastructure as Code with Terraform
- Where Modules Come From — HashiCorp Terraform Associate (004) Exam Prep
- Module Scope: What Goes In, What Comes Out — HashiCorp Terraform Associate (004) Exam Prep
- Module Versions: Pin, Upgrade, Re-Initialise — HashiCorp Terraform Associate (004) Exam Prep
- Importing What Terraform Did Not Build — HashiCorp Terraform Associate (004) Exam Prep
- Collaboration And Governance: Teams, Policies, Registry And Health — HashiCorp Terraform Associate (004) Exam Prep