Skip to content

Commit 4e68db9

Browse files
committed
Add CONTRIBUTING.md file
1 parent 1997953 commit 4e68db9

File tree

1 file changed

+132
-0
lines changed

1 file changed

+132
-0
lines changed

CONTRIBUTING.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributing to terraform-helm-materialize
2+
3+
We want to make contributing to `terraform-helm-materialize` as easy and transparent as possible, whether it's:
4+
5+
- Reporting a bug
6+
- Discussing the current state of the code
7+
- Submitting a fix
8+
- Proposing new features
9+
- Becoming a maintainer
10+
11+
## We Develop with Github
12+
We use GitHub to host Terraform module, to track issues and feature requests, as well as accept pull requests.
13+
14+
## Pull Requests
15+
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
16+
17+
1. Fork the repo on GitHub by clicking the 'Fork' button at the top right.
18+
2. Clone your fork and create your branch from `main`.
19+
3. If you've added code that should be tested, add tests.
20+
4. If you've changed APIs, update the documentation.
21+
5. Ensure the test suite passes.
22+
6. Make sure your code lints.
23+
7. Issue that pull request!
24+
25+
## Core Module Usage
26+
27+
This Helm module is used as a core component in the following cloud-specific modules:
28+
29+
- [terraform-aws-materialize](https://github.com/MaterializeInc/terraform-aws-materialize)
30+
- [terraform-azurerm-materialize](https://github.com/MaterializeInc/terraform-azurerm-materialize)
31+
- [terraform-google-materialize](https://github.com/MaterializeInc/terraform-google-materialize)
32+
33+
When making changes, consider how they might impact these dependent modules.
34+
35+
## Generating Documentation
36+
37+
This module uses [terraform-docs](https://terraform-docs.io/user-guide/introduction/) to generate documentation. To generate the documentation, run the following command from the root of the repository:
38+
39+
```bash
40+
terraform-docs --config .terraform-docs.yml .
41+
```
42+
43+
## Development Process
44+
45+
1. Fork the repository on GitHub
46+
2. Clone your fork
47+
```bash
48+
git clone https://github.com/YOUR-USERNAME/terraform-helm-materialize.git
49+
```
50+
51+
3. Create a new branch
52+
```bash
53+
git checkout -b feature/your-feature-name
54+
```
55+
56+
4. Make your changes and test them.
57+
58+
5. Before committing, run these commands from the root of the repository:
59+
```bash
60+
# Run the linter with recursive and compact format
61+
tflint --recursive --format compact
62+
63+
# Format the Terraform code
64+
terraform fmt -recursive
65+
66+
# Generate updated documentation
67+
terraform-docs --config .terraform-docs.yml .
68+
```
69+
70+
6. Commit your changes
71+
```bash
72+
git commit -m "Add your meaningful commit message"
73+
```
74+
75+
7. Push to your fork and submit a pull request
76+
77+
## Testing with Cloud-Specific Modules
78+
79+
Since this module is a core component used by cloud-specific modules, it's important to test your changes with at least one of these modules:
80+
81+
1. Clone one of the cloud-specific modules:
82+
```bash
83+
git clone https://github.com/MaterializeInc/terraform-aws-materialize.git
84+
# OR
85+
git clone https://github.com/MaterializeInc/terraform-azurerm-materialize.git
86+
# OR
87+
git clone https://github.com/MaterializeInc/terraform-google-materialize.git
88+
```
89+
90+
2. Update the module source in the cloud-specific module to point to your local copy:
91+
```hcl
92+
module "operator" {
93+
source = "/path/to/your/cloned/terraform-helm-materialize"
94+
# Instead of the usual:
95+
# source = "github.com/MaterializeInc/terraform-helm-materialize?ref=v0.1.8"
96+
97+
# Rest of the configuration...
98+
}
99+
```
100+
101+
3. Run terraform initialization and planning to verify that your changes work correctly with the cloud-specific module:
102+
103+
```bash
104+
terraform init
105+
terraform plan
106+
```
107+
108+
4. If possible, test a full deployment to verify that your changes work as expected in a real environment
109+
110+
## Versioning
111+
112+
We follow [Semantic Versioning](https://semver.org/). For version numbers:
113+
114+
- MAJOR version for incompatible API changes
115+
- MINOR version for added functionality in a backwards compatible manner
116+
- PATCH version for backwards compatible bug fixes
117+
118+
## Cutting a new release
119+
120+
Perform a manual test of the latest code on `main`. See prior section. Then run:
121+
122+
```bash
123+
git tag -a vX.Y.Z -m vX.Y.Z
124+
git push origin vX.Y.Z
125+
```
126+
127+
## References
128+
129+
- [Terraform Documentation](https://www.terraform.io/docs)
130+
- [Kubernetes Documentation](https://kubernetes.io/docs/home/)
131+
- [Helm Documentation](https://helm.sh/docs/)
132+
- [Materialize Documentation](https://materialize.com/docs)

0 commit comments

Comments
 (0)