concept

Terraform configuration files and module boundaries

A module consists of ordinary top-level .tf and .tf.json configuration files in one directory; subdirectories are separate and need explicit module calls to participate. Ordinary filenames organize code rather than control execution order. Override filenames have special merge behavior. terraform fmt -check checks formatting, not semantic validity.

Formal Syntax & Structure

terraform syntaxterraform
Terraform configuration files and module boundaries

Working Example

Example Snippetterraform
terraform fmt -check -diff
Terraform Reference