Template for new Terraform module projects, following the patterns.
To more infos, read our Notion Page about how we use Terraform Modules
-
Files
main.tf
,variables.tf
,outputs.tf
files to module root path -
.editorconfig
,.gitignore
and.gitattributes
files to module root path -
.pre-commit-config.yaml
forterraform fmt
,terraform-docs
andcheck-merge-conflict
-
example
directory with module usage tf files
- terraform (v0.15.x)
- terraform-docs
- pre-commit
To use this template, you need:
-
Download the code
git clone --depth 1 URL_REPO NEW_MODULE_NAME
-
On the module's root path, Initialize a new git repository
git init
-
For ativate pre-commit, on the module's root path, install pre-commit hooks
pre-commit install
-
The file
README.MD
is a template of a readme file for terraform modules. Fill it with the requested information about the module.
Structure of files and folders for this project.
.
├── example
│ ├── main.tf
│ ├── outputs.tf
│ ├── README.md
│ ├── subnets.tf
│ ├── terraform.tfvars_exemple
│ └── variables.tf
├── main.tf
├── outputs.tf
├── README.md
├── resources.tf
├── TEMPLATE-DOC.md
└── variables.tf
MIT