A Yeoman generator that scaffolds Terraform module projects with pre-configured files, testing frameworks, and pre-commit hooks.
generator-tf-module is a Yeoman generator that creates standardized project structures for Terraform modules. It automates the setup of essential files, testing frameworks, and pre-commit hooks to accelerate Terraform module development. The tool helps maintain consistency and best practices across Terraform projects.
Terraform developers and DevOps engineers who regularly create and maintain Terraform modules and want to standardize their project structure with minimal setup time.
Developers choose this generator because it provides a production-ready scaffold with testing frameworks and automation tools pre-configured, eliminating manual setup and ensuring adherence to Terraform best practices from the start.
Project scaffolding for Terraform
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates essential Terraform files like main.tf, variables.tf, and outputs.tf, along with configuration files such as .editorconfig and .gitignore, as listed in the README's features section.
Allows selection between Terratest (Go-based) or kitchen-terraform (Ruby-based) with example test files, providing options based on team preference, as described in the prompts.
Creates a .pre-commit-config.yaml with hooks for terraform fmt, terraform-docs, and language-specific formatting, ensuring code quality from the start, per the README.
Can be used via Docker or Node.js with support for multiple Terraform versions, making it accessible in different environments, as shown in the usage commands.
Requires installation of terraform, terraform-docs, pre-commit, and additional tools like golang or ruby for tests, which adds complexity and time, as outlined in the prerequisites.
After generation, users must manually run git init, pre-commit install, and for Terratest, go get commands, which aren't fully automated, as specified in the post-generation steps.
Different Docker tags or npm versions are needed for Terraform 1.x vs 0.13-0.15, adding complexity when working with multiple Terraform versions, as mentioned in the usage instructions.