Contributing¶
Thank you for contributing to the EKS Infrastructure Template! This guide explains how to contribute effectively.
Getting Started¶
- Fork the repository on GitHub
-
Clone your fork locally:
-
Install pre-commit hooks:
-
Create a feature branch:
Development Workflow¶
Branching Strategy¶
| Branch Type | Pattern | Example |
|---|---|---|
| Feature | feat/ | feat/add-cluster-autoscaler |
| Bug fix | fix/ | fix/node-group-scaling |
| Maintenance | chore/ | chore/update-terraform-version |
| Documentation | docs/ | docs/update-readme |
Never commit directly to main
All changes must go through a pull request.
Making Changes¶
- Make your changes following the code style
-
Run pre-commit to validate:
-
Commit following Conventional Commits:
-
Push and open a Pull Request
Pull Request Guidelines¶
PR Title¶
Follow the Conventional Commits format:
feat(eks): add cluster autoscaler support
fix(alb): resolve health check configuration
docs: update quick start guide
PR Checklist¶
- [ ] Code follows existing patterns and style
- [ ] Terraform files are formatted (
terraform fmt -recursive) - [ ]
terraform validatepasses - [ ] Pre-commit hooks pass
- [ ] Documentation updated if needed
- [ ] Tests added for new functionality
Automated Checks¶
When you open a PR, these checks run automatically:
| Check | Tool | Purpose |
|---|---|---|
| Format | terraform fmt | Code style |
| Validate | terraform validate | Configuration validity |
| Lint | TFLint | Best practices |
| Security | Checkov | Security vulnerabilities |
| Secrets | Gitleaks | Secret detection |
| Cost | Infracost | Cost impact |
| Docs | terraform-docs | Documentation generation |
Terraform Module Guidelines¶
Variable Documentation¶
All variables must have descriptions:
variable "cluster_version" {
description = "Kubernetes cluster version"
type = string
default = "1.31"
}
Naming Conventions¶
- Use
snake_casefor all resource names - Follow the
{prefix}-{env}-{resource}pattern:
Resource Tagging¶
Add common tags to all resources:
Documentation Updates¶
When adding features, update relevant documentation in docs/:
- New variables →
docs/reference/configuration.md - New workflows →
docs/user-guide/workflows.md - Architecture changes →
docs/index.md
Run the docs locally to preview:
Open http://localhost:8000 to preview.
Reporting Issues¶
Use GitHub Issues to report:
- Bugs with steps to reproduce
- Feature requests with use cases
- Documentation improvements
Code of Conduct¶
Be respectful, inclusive, and constructive in all interactions.