Thank you for your interest in contributing to this project! We welcome contributions from the community.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Testing
- Documentation
- Community
This project adheres to a Code of Conduct that we expect all contributors to follow. Please read CODE_OF_CONDUCT.md before contributing.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/terraform-aws-github-runners.git - Add the upstream repository:
git remote add upstream https://github.com/cloudandthings/terraform-aws-github-runners.git - Create a new branch:
git checkout -b feature/your-feature-name
- Terraform >= 0.14.0
- pre-commit for code quality checks
- mise (optional but recommended) for tool version management
- AWS Account for testing (optional)
This project uses mise to manage tool versions. Install mise and run:
mise installThis will install all required tools as defined in mise.toml.
If not using mise, install the following tools:
- Terraform 1.5.7 or later
- Python 3.10.8 or later
- terraform-docs
- tflint
- pre-commit
- black
- ruff
Pre-commit hooks ensure code quality and consistency:
pre-commit install- Use the GitHub issue tracker
- Search existing issues first to avoid duplicates
- Use the bug report template
- Include as much detail as possible:
- Terraform version
- AWS provider version
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs or error messages
- Use the GitHub issue tracker
- Use the feature request template
- Clearly describe the feature and its use case
- Explain why this enhancement would be useful
- Pick an issue or create a new one
- Comment on the issue to let others know you're working on it
- Fork the repository and create a branch
- Make your changes following our coding standards
- Test your changes thoroughly
- Run pre-commit checks
- Submit a pull request
-
Update Documentation: Update README.md and other relevant documentation
-
Add Tests: Include tests for new functionality (if applicable)
-
Run Pre-commit: Ensure all pre-commit checks pass
pre-commit run -a
-
Use Conventional Commits: Follow the commit message format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesimprovement:- Enhancements to existing featuresrefactor:- Code refactoringtest:- Test additions or updatesci:- CI/CD changeschore:- Maintenance tasks (excluded from changelog)
-
PR Title: Use the same conventional commit format for PR titles
-
Description: Provide a clear description of changes
-
Link Issues: Reference related issues (e.g., "Fixes #123")
-
Wait for Review: Maintainers will review and provide feedback
-
Address Feedback: Make requested changes
-
Merge: Once approved, a maintainer will merge your PR
- Follow Terraform best practices
- Use meaningful variable and resource names
- Add descriptions to all variables and outputs
- Include validation rules where appropriate
- Use locals for computed values
- Keep resources organized in appropriate files:
main.tf- Core resourcesvariables.tf- Input variablesoutputs.tf- Output valuesiam.tf- IAM resourceslogs.tf- Logging resourcesdata.tf- Data sourceslocals.tf- Local valuesversions.tf- Version constraints
- Run
terraform fmt -recursivebefore committing - Use 2 spaces for indentation
- Keep lines under 120 characters when possible
- Add comments only when necessary to explain complex logic
- Use checkov skip comments with clear explanations
- Document any security-related decisions
- Never commit secrets or credentials
- Use AWS Systems Manager Parameter Store or Secrets Manager for sensitive values
- Follow the principle of least privilege for IAM policies
- Run security scanning tools (tfsec, checkov) before submitting
All pre-commit hooks must pass:
pre-commit run -aThis includes:
- Terraform formatting (
terraform fmt) - Terraform validation (
terraform validate) - Terraform documentation generation (
terraform-docs) - Security scanning (tfsec, checkov)
- Linting (tflint)
- Shell script checking (shellcheck)
- Python formatting (black, ruff)
Test your changes with the example configurations:
cd examples/basic
terraform init
terraform validate
terraform planRun security scans locally:
# Trivy scan
trivy config .
# Checkov scan
checkov -d .
# TFSec scan
tfsec .The main README.md is partially auto-generated using terraform-docs. After changing variables, outputs, or resources:
terraform-docs markdown table --config .tfdocs-config.yml --output-file README.md .Or simply run pre-commit which will update it automatically:
pre-commit run -aExamples in the examples/ directory have their own READMEs that are also auto-generated. The Python script handles this:
python examples/terraform-docs.py- Keep documentation clear and concise
- Include practical examples
- Document prerequisites and dependencies
- Explain the "why" not just the "how"
- Update documentation in the same PR as code changes
- Check existing issues
- Read the documentation
- Review examples
- Be respectful and constructive
- Focus on the issue, not the person
- Assume good intentions
- Ask questions when something is unclear
Releases are automated using Release Please:
- Conventional commit messages are used to generate changelogs
- Version bumps are automatic based on commit types
- CHANGELOG.md is automatically updated
- Maintainers merge the release PR to create a new release
By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing! 🎉