Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this project.
All contributors must follow the dbt Community Code of Conduct. See also CODE_OF_CONDUCT.md in this repository.
Do not open a public issue. Follow SECURITY.md.
If you find a bug, please create an issue with:
- Clear description of the bug
- Steps to reproduce
- Expected vs. actual behavior
- Your environment (Terraform version, OS, etc.)
- Any relevant configuration snippets
Feature requests are welcome! Please include:
- Description of the feature
- Use case and why it's needed
- Any examples or mockups
-
Fork the repository
git clone https://github.com/your-username/terraform-dbtcloud-as-yaml.git cd terraform-dbtcloud-as-yaml git checkout -b feature/your-feature-name -
Make your changes
- Follow the existing code style
- Add comments for complex logic
- Update documentation as needed
-
Test your changes
Pre-commit hooks run automatically on
git commit(fmt, validate, lint, docs) and pre-push hooks run ongit push(terraform test + YAML schema self-tests). To run all hooks manually without committing:pre-commit run --all-files
To check CI parity before opening a PR:
act act -j <jobname>
-
Commit with clear messages
git commit -m "Add: clear description of changes" -
Push and open a PR
git push origin feature/your-feature-name
- Terraform >= 1.7 (use tfenv or asdf —
.terraform-versionis provided) - tflint
- Git
- pre-commit
- uv
- Docker (required by
act) - act
- terraform-docs v0.20.0
git clone https://github.com/your-username/terraform-dbtcloud-as-yaml.git
cd terraform-dbtcloud-as-yaml
terraform init -backend=falseOne-time setup after cloning:
pre-commit install --hook-type pre-commit --hook-type pre-push| Action | What runs |
|---|---|
git commit |
fmt, validate, lint, docs, schema-drift (pre-commit hooks) |
git push |
terraform test (root + all 5 modules), YAML schema self-tests (pre-push hooks) |
pre-commit run --all-files |
All pre-commit hooks on every file |
bash scripts/gen-docs.sh |
Regenerate terraform-docs manually |
act |
Full CI parity — all jobs |
act -j <jobname> |
Single CI job (validate, module-tests, docs, schema-drift, yaml-validate, mkdocs-build) |
cd test && RUN_INTEGRATION_TESTS=1 DBT_CLOUD_ACCOUNT_ID=... DBT_CLOUD_TOKEN=... go test -v -timeout 30m -run Integration ./... |
Integration tests (requires dbt Cloud credentials) |
Before submitting a PR, verify that all hooks pass and CI is green locally:
pre-commit run --all-files
actFor integration tests (requires dbt Cloud credentials):
cd test && RUN_INTEGRATION_TESTS=1 DBT_CLOUD_ACCOUNT_ID=<id> DBT_CLOUD_TOKEN=<token> \
go test -v -timeout 30m -run Integration ./...You can also trigger the integration.yml workflow from the GitHub Actions UI.
- Update
README.mdfor user-facing changes - Update module
variables.tfwith clear descriptions - Add comments to complex logic
- Include examples for new features
Maintainers will:
- Update version numbers following Semantic Versioning
- Update
CHANGELOG.md - Create a GitHub release with release notes
- Tag the commit with version number
- Check existing GitHub issues
- Review the README and documentation
- Open a new discussion in GitHub Discussions
By contributing, you agree that your contributions will be licensed under the project's Apache License 2.0.
Thank you for contributing!