concept

Root and child modules

Reuse a child configuration with explicit inputs and outputs.

Formal Syntax & Structure

terraform syntaxterraform
Root and child modules

Working Example

Example Snippetterraform
terraform {  required_version = "= 1.14.8"}
module "dev" {  source = "./modules/label"  name   = "dev-catalog"}
module "test" {  source = "./modules/label"  name   = "test-catalog"}
output "dev_metadata" {  value = module.dev.metadata}
output "test_metadata" {  value = module.test.metadata}
Terraform Reference
Root and child modules — Terraform Syntax & | ByteMind