How should you version and pin modules?
IntermediateConceptModules
Answer
Publish semver tags, and have callers pin an exact version or ~> range for registry modules or a tag or commit SHA for Git modules. Never track main. Pinning means upgrades happen as a reviewed change with a plan, and rollbacks are a one-line revert.
More on Modules
What is a Terraform module and why use one?BeginnerHow do you call a module?BeginnerHow do inputs and outputs work with modules?BeginnerWhich module source types exist and where does `version` apply?IntermediateCan you use `count` and `for_each` on modules?IntermediateHow do providers get passed to a module?Advanced