Welcome. This repository ships the Terraform modules customers use to deploy HailBytes ASM and SAT into their own AWS / Azure tenants from the marketplace. The modules are MPL-2.0 and we accept community PRs, with a few conventions worth knowing before you open one.
- HCL only. No bundled binaries, no
externaldata sources that shell out to non-marketplace tooling, nouser_datathat pulls HailBytes software from anywhere other than the marketplace AMI / Azure image. SeeBILLING.mdfor why this is structural rather than stylistic. - One module = one tier.
single-vm,ha-hot-hot, andunlimited-scaleare the three tiers. The per-product wrappers (sat-aws-ha,asm-aws-ha, etc.) are thin shims that hardcodeproductand forward every other variable. If you add a knob to a core module, you must forward it through both product wrappers in the same PR — thewrapper-forwardingCI gate enforces this. - Cost shapes have a canonical source. All procurement-grade
pricing flows through
COST_SHAPES.md, which referenceshailbytes-sat/docs/AWS_HA_DEPLOYMENT.mdfor AWS list prices. Per-module READMEs may show their starter-default sizing but should link toCOST_SHAPES.mdfor the cross-tier comparison.
.github/workflows/ci.yml runs:
terraform fmt -check— recursive across the tree.terraform validate— per-module matrix across all 22 dirs.tflint— recursive, withterraform+aws+azurermplugins. Error severity gates the build; warnings surface in logs.checkov(.github/workflows/checkov.yml) — findings fail the build unless waived in.checkov.yaml. New suppressions must add askip-checkentry with theCKV_*ID, a category letter, and a one-line rationale; PRs that suppress a finding without one are rejected at review.trivy-iac(.github/workflows/trivy-iac.yml) — MEDIUM+ misconfigurations fail the build unless waived in.trivyignore. New suppressions must add an entry with theAVD-*ID and a one-line rationale, cross-referencing the matching.checkov.yamlrule where one exists.examples-validate— everymodules/*/{aws,azure}/examples/basicsubtree mustterraform validateclean. Customer copy-paste starting points stay buildable.marketplace-id-consistency— everymarketplace_product_codesuse carries the canonical AWS AMI codes (d19hjbz3gakqdlonlf8twdmllfor SAT,1n57wg1f6735e30vj5fn420bpfor ASM) and the canonical Azure publisher / offer slugs. See Cross-repo marketplace verification below.wrapper-forwarding— every wrapper module declares the same variables as its core module, minus the intentionally-hiddenproduct.versions-tf— every module dir with.tffiles has aversions.tfdeclaringrequired_version+required_providers.cost-shapes-sync—COST_SHAPES.mdcarries every canonical marker (per-tier × per-cloud, per-vCore meter, Azure Cache sizing). Fails fast on a partial edit that drops a section.
The CI gate in (6) above asserts that all modules in this repo
use the same AMI product codes and Azure publisher slugs. At release
time, an additional manual check confirms those identifiers still
match the application repos' MARKETPLACE.md files:
hailbytes-sat/MARKETPLACE.mdhailbytes-asm/MARKETPLACE.md
A drift between the application repo's MARKETPLACE.md and this
repo's wired-in defaults means a customer who picks a fresh tag will
deploy from the wrong image. Reconcile via the application repo
first, then mirror in this repo.
- Add the core module under
modules/<new-tier>/{aws,azure}. Thetierdirectory should containmain.tf,variables.tf,outputs.tf,versions.tf,README.md, andexamples/basic/. - Add a per-product wrapper under
modules/{sat,asm}-{aws,azure}-<new-tier>/. The wrapper hardcodesproductand forwards every other variable. - Extend the CI matrices in
.github/workflows/ci.yml:validate(always),examples-validate(if you add an example),wrapper-forwarding(for the new wrapper-core pair). - Add a row to
COST_SHAPES.mdif the new tier has a meaningfully different cost shape.
- Declare the variable in the core module's
variables.tfwith a description, type, and a safe default. - Wire it through the core module's
main.tf. - Add the same variable to both product wrappers'
variables.tfand forward it in theirmain.tf. Thewrapper-forwardingCI gate enforces this; if you miss a wrapper, the build fails with the missing var name in the error message. - If the new knob materially changes the cost shape, update the
per-module README cost table AND
COST_SHAPES.md.
Any PR that changes module behaviour in a way that produces a
non-empty plan diff for existing customers — adds a default-on
resource, renames a resource (moved block required), changes a
default that affects RDS / KMS — must include a "Migration notes"
section in CHANGELOG.md documenting the expected plan diff. The
Redis-by-default change in the most recent [Unreleased] section is
a reference example.
By submitting a PR you agree your contribution is licensed under
MPL-2.0. See LICENSE.