Skip to content

Latest commit

 

History

History
123 lines (95 loc) · 3.87 KB

CONTRIBUTING.md

File metadata and controls

123 lines (95 loc) · 3.87 KB

Contributing to TrakRF Infra

Thank you for your interest in contributing! This repo manages TrakRF's cloud infrastructure across Cloudflare, AWS (EKS), and GCP (GKE). We welcome improvements and feedback.

Ways to Contribute

1. Report Issues

  • Found a bug? Open an issue
  • Have a feature request? Describe your use case
  • Documentation unclear? Let us know what's confusing

2. Submit Pull Requests

  • Fix bugs or typos
  • Add new infrastructure modules
  • Improve documentation
  • Enhance security or error handling

3. Share Your Experience

  • How are you using these patterns?
  • What works well? What doesn't?
  • Share your custom infrastructure patterns

Development Setup

Prerequisites

  • Git
  • OpenTofu (or Terraform)
  • just command runner
  • direnv for environment management
  • Cloud CLI tools as needed (AWS CLI, gcloud, wrangler)

Getting Started

  1. Clone and configure

    git clone https://github.com/trakrf/infra
    cd infra
    cp .env.local.sample .env.local  # Add your credentials
    direnv allow
  2. Validate infrastructure code

    tofu -chdir=terraform/cloudflare validate
    tofu -chdir=terraform/aws validate
  3. Test in isolated environment

    • Use separate cloud accounts for testing
    • Enable budget alarms to prevent cost surprises
    • Review all infrastructure changes before applying
    • Clean up resources after testing

Contribution Guidelines

Code Style

Commit Messages

Follow Conventional Commits:

feat: add EKS node group autoscaling
fix: correct IAM policy for ArgoCD
docs: update cluster setup instructions
chore: update provider versions

Pull Request Process

  1. Create a branch

    git checkout -b <type>/<short-slug>   # e.g. fix/dns-record-drift

    Use the same types as the commit prefixes below. Maintainers working from a tracker issue insert the ticket: <type>/<ticket>-<slug>.

  2. Make your changes

    • Keep changes focused and atomic
    • Update documentation as needed
    • Add examples if introducing new features
  3. Test thoroughly

    • Run tofu validate and tofu fmt -check
    • Run tofu plan to verify expected changes
    • Check for exposed secrets or credentials
    • If you edited a doc, run ./scripts/check-doc-paths.sh — CI fails when a file named in the docs does not exist
  4. Submit PR

    • Provide clear description of changes
    • Link to related issues
    • Include tofu plan output for infrastructure changes
    • PRs are merged with --merge (no squash or rebase)
  5. Respond to feedback

    • Address review comments
    • Be open to suggestions

Security Considerations

When contributing:

  • Never commit real credentials (API tokens, keys, passwords)
  • Use .env.local for secrets (gitignored)
  • Review all infrastructure changes before submitting
  • Report security issues via GitHub Security Advisories
  • See SECURITY.md for full security policy

Questions?

  • Open a discussion in GitHub Issues
  • Check existing issues for similar questions

Code of Conduct

See CODE_OF_CONDUCT.md.

License

By contributing, you agree that your contributions will be licensed under the MIT License.