Skip to content

Template for new Terraform module projects, following the patterns.

License

Notifications You must be signed in to change notification settings

arquivei/template-tf-module

Repository files navigation

Terraform Module Template

Template for new Terraform module projects, following the patterns.

To more infos, read our Notion Page about how we use Terraform Modules


Features

  • 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 for terraform fmt, terraform-docs and check-merge-conflict

  • example directory with module usage tf files


Prerequisites


How to start using this template?

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.


Struture

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


License

MIT

Releases

No releases published

Packages

No packages published

Languages