Skip to content

Commit 3129081

Browse files
committed
chore: adding "how to contribute"
chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding "how to contribute" chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules chore: adding files to modules
1 parent dadec5d commit 3129081

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,106 @@ Refer to each module's README.md for specific usage instructions such as needed
5050

5151
The meshStack Hub is a 🌤️ [cloudfoundation.org community](https://cloudfoundation.org/?ref=github-collie-cli) project.
5252
Reach out to us on the [cloudfoundation.org slack](http://cloudfoundationorg.slack.com).
53+
54+
## 🛠️ How to Contribute
55+
56+
Thank you for your interest in contributing Terraform modules or building blocks to **meshstack-hub**! To ensure high quality and consistency, please follow the steps below:
57+
58+
---
59+
60+
### 1. Fork & Clone
61+
62+
```bash
63+
git clone [email protected]:<your-username>/meshstack-hub.git
64+
cd meshstack-hub
65+
git checkout -b feature/your-module
66+
```
67+
68+
---
69+
70+
### 2. Enter Nix Development Shell
71+
72+
The repository provides a `flake.nix` that includes pre-commit hooks, formatting, validation, and docs generation:
73+
74+
```bash
75+
nix develop
76+
```
77+
78+
This prepares the environment with `terraform`, `terraform-docs`, `pre-commit`, and any other needed tools automatically.
79+
80+
---
81+
82+
### 3. Write and Organize Your Terraform Module
83+
84+
- Add your module under the correct provider folder (e.g. `aws/`, `azure/`, `gcp/`).
85+
- Include:
86+
- `main.tf`, `variables.tf`, `outputs.tf`, `versions.tf`, `providers.tf`, `APP_TEAM_README.md`
87+
- A `README.md` describing the module’s purpose and usage.
88+
89+
---
90+
91+
### 4. Run Pre‑commit Hooks
92+
93+
Hooks are already available in your shell:
94+
95+
```bash
96+
pre-commit run --all-files
97+
```
98+
99+
They include checks like `terraform fmt`, `terraform validate` and automated docs via `terraform-docs`.
100+
101+
Commiting will auto-run them:
102+
103+
```bash
104+
git add .
105+
git commit -m "feat(aws/vpc): add new vpc module"
106+
```
107+
108+
---
109+
110+
This is typically triggered via pre-commit hooks during commits.
111+
112+
---
113+
114+
### 7. Add or Update Tests
115+
116+
- Run them inside `nix develop`, for example:
117+
118+
Ensure all tests pass and code/formats stay clean.
119+
120+
---
121+
122+
### 8. Push & Open a Pull Request
123+
124+
```bash
125+
git push origin feature/your-module
126+
```
127+
128+
In your PR description include:
129+
- Module purpose, inputs/outputs
130+
- Provider details
131+
- Any breaking changes or migration notes
132+
- Confirmation that all tests and checks passed
133+
134+
---
135+
136+
### 9. Review & Merge
137+
138+
CI will rerun all hooks/tests. A maintainer will review and merge or request adjustments.
139+
140+
---
141+
142+
## ✅ Summary Checklist
143+
144+
1. [ ] Module in the correct provider folder
145+
2. [ ] `main.tf`, `variables.tf`, `outputs.tf`, `README.md`
146+
3. [ ] `nix develop` used to enter environment ✅
147+
4. [ ] `pre-commit run --all-files` passed ✅
148+
5. [ ] `terraform init`, `validate`, `fmt` passed ✅
149+
6. [ ] `terraform-docs markdown .` docs generated ✅
150+
7. [ ] Tests added/updated and passing ✅
151+
8. [ ] PR includes description & proof that all checks passed ✅
152+
153+
---
154+
155+
Thanks again for helping to improve **meshstack-hub**! 🚀

0 commit comments

Comments
 (0)