Thanks for helping improve this module. Please open pull requests against main, and run through the short checklist below before you submit—whether you wrote the change yourself, paired with a tool, or used an AI assistant. It keeps reviews quick and consistent for everyone.
This repo is ROSA HCP only. The sibling ROSA Classic module is terraform-rhcs-rosa-classic — do not mix architectures, resources, or variable names between the two.
| Location | Purpose |
|---|---|
.cursor/rules/ |
Hard guardrails in .mdc files (always-on in Cursor): HCP compared to Classic, provider/version constraints, variables, security baseline |
AGENTS.md |
Skills, workflow, security (agent checks), testing expectations; commands live in CONTRIBUTING.md; canonical guardrails in .cursor/rules/ |
CLAUDE.md, GEMINI.md |
One-line pointers to AGENTS.md (names match Claude Code / Gemini CLI defaults) |
HashiCorp Terraform skills (optional reference when generating or refactoring HCL): terraform skills in agent-skills — e.g. terraform-style-guide, terraform-test, refactor-module. If a skill conflicts with CONTRIBUTING.md, CONTRIBUTING.md takes precedence (see AGENTS.md).
- Format —
terraform fmt -recursive(or format only dirs you changed). - Validate —
make verify(runsterraform init+validatein eachexamples/*directory; compatible with the minimum Terraform version in rootversions.tf, currently >= 1.5.7). Fix failures in examples you touch or that your change breaks. - Docs — If you changed variables, outputs, modules, or root wiring: run
make verify-gen(runsterraform-docsviascripts/terraform-docs.sh, thenscripts/verify-gen.shto ensure README inject blocks are committed). - Module tests — If a submodule under
modules/<name>/tests/has*.tftest.hcl, runterraform init -backend=false && terraform testfrommodules/<name>/, or runmake unit-testsfor all modules with tests. - Documentation lint —
make docs-lintruns the pinned Vale CLI (release binary from vale-cli/vale) with Red Hat documentation styles (see.vale.ini). - Provider — Treat
terraform-redhat/rhcsas the source of truth: mirror its schemas in variables and docs. Addvalidation/preconditiononly to echo the provider’s required fields and allowed values (fail fast); do not duplicate or tighten rules the provider already enforces. - Module scope (AWS-only) — If the change adds or expands AWS-only configuration (no
rhcssurface), confirm it matchesModule scope (AWS-only vs core HCP)in.cursor/rules/rosa-hcp-terraform.mdc. In the PR, link official Red Hat or cited ROSA HCP documentation that supports shipping it in-repo, or explain why an exception is justified.
Run the full local verification flow (same steps as the planned single OpenShift Prow presubmit) with:
make pre-push-checksmake pre-push-checks runs tools (installs pinned CLI versions from the Makefile), then verify, verify-gen, lint, unit-tests, license-check, and docs-lint in order (fail-fast). Install tools alone with make tools. Run individual check targets when debugging one step. OpenShift Prow will use make pre-push-checks as the presubmit merge gate after openshift/release is updated (client image from the root Dockerfile pins the newest Terraform release for integration jobs). GitHub Actions runs verify-min-terraform.yml on every PR to validate examples at the module minimum in root versions.tf. Run make pre-push-checks locally before opening a PR (use a Terraform version that satisfies versions.tf locally, or match the versions you need to debug).
Security (separate from the merge gate): make security-check runs Gitleaks secret detection on the current tree (--no-git; config: .gitleaks.toml) and Checkov Terraform static analysis (checkov.yaml; fails on HIGH and CRITICAL; --skip-download for offline use, no Prisma Cloud API key). Install both locally with make security-check-bin (or make gitleaks / make checkov). Checkov GitHub release zips have no upstream checksum file; when bumping CHECKOV_VERSION, add or update hack/checksums/checkov-<version>.sha256sums (one line per platform zip) and verify with sha256sum -c before committing.
This repository enforces commit subjects in this format:
[JIRA-TICKET] | [TYPE][(scope)][!]: [short description]
Examples:
OCM-12345 | feat: add day-1 setting supportOCM-12345 | fix(cluster): validate machine pool defaultsOCM-12345 | feat!: change upgrade behaviorOCM-00000 | chore: adjust CI workflow
Allowed TYPE values:
feat: A new featurefix: A bug fixdocs: Documentation-only changesstyle: Formatting and non-functional style changesrefactor: Refactoring with no behavior changetest: Add or correct testschore: Build/task/maintenance workbuild: Build system or dependency updatesci: Continuous integration changesperf: Performance improvements
[!IMPORTANT] DCO Sign-off Required: Every commit must include a Developer Certificate of Origin (DCO) sign-off line (Signed-off-by: Name ). Use git commit -s when committing.
CI validates commit messages on pull requests targeting main with:
.github/workflows/check-commit-format.ymlmake commits/checkhack/commit-msg-verify.sh
The changelog is generated with git-cliff using cliff.toml.
Only the CHANGELOG.md in the main branch contains the full changelog history.
Workflow:
- Push a stable release tag (for example,
v1.7.3). - GitHub Actions validates the tag and finds the previous stable release tag.
- The workflow generates changelog entries and opens a pull request to
mainwith labelchangelog.
Manual changelog generation:
# Generate changelog for a specific release range
git-cliff v1.7.2..v1.7.3 --prepend CHANGELOG.md