Terraform Modules are Terraform configurations that can be called and configured by other configurations. They serve as containers for multiple resources that are used together. They contain a collection of.tf files kept together in a directory. To create a module, pack all your .tf
files into a Zip archive and deploy to the Terraform local repository. For more information, see Creating Terraform Modules.
Terraform Module Repository Structure
The Terraform Module repository is a directory with a collection of Zip files, consisting of these main coordinates:
namespace
module
Provider
version.zip
Artifactory complies with the Terraform Module directory layout convention.
namespace/module-name/provider/version.zip
For example:
terraform-aws-modules/vpc/aws/2.0.0.zip harshicorp/consul/aws/DEV-123.zip