A standardized template for creating Terraform modules with consistent structure and best practices.
This repository provides a boilerplate structure for developing reusable Terraform modules. It includes essential files, configuration examples, and documentation templates to ensure consistency across module development.
├── .github/
│ ├── workflows/
│ │ └── main.yml # CI/CD pipeline configuration
│ └── contributing.md # Contribution guidelines
├── .gitignore # Git ignore patterns for Terraform
├── LICENSE # Module license
├── main.tf # Primary module configuration
├── outputs.tf # Module output definitions
├── README.md # Module documentation
├── variables.tf # Input variable declarations
└── versions.tf # Provider and Terraform version constraints
Ensure your module follows Terraform best practices:
- Run
terraform fmtto format code - Run
terraform validateto validate syntax - Run
terraform planto verify configuration - Test with multiple provider versions
Update the following sections when developing your module:
- Module description and purpose
- Input variables with descriptions and types
- Output values and their usage
- Usage examples
- Requirements and dependencies
We welcome contributions! Please see our Contributing Guidelines for detailed information on:
- Development setup and workflow
- Pull request process
- Coding standards and testing requirements
- Semantic commit message format
Quick start:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This module is licensed under the Apache 2.0 License. See LICENSE file for details.