All Projects → chanzuckerberg → cztack

chanzuckerberg / cztack

Licence: MIT license
The CZI infrastructure stack.

Programming Languages

HCL
1544 projects
go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
python
139335 projects - #7 most used programming language

CZtack

Cztack (pronounced "stack") is CZI's collection of Terraform modules. We use these as way to scale our infrastructure work.

These modules are compatible with Terraform 0.12 and up.

Contributing

Making a release

Release-please managages all the releases. To make a release, merge the release PR.

Adding a new module

To create a new module, copy the module-template directory and modify as you see fit. And make sure to add the module to the list of modules to test in .github/workflows/ci.yml.

Writing tests

A few notes on writing test for this repo. Note that this is new ground for us, so this will be a work in progress.

  • To make modules testable, all fields that have a unique constraint need to be parameterizeable. Otherwise concurrent tests will conflict.
  • It is tempting in testing module A to use module B to set up some context, but because terraform will just store the statefile locally, you can have a conflict.
    • We've tried to avoid this for now and set up context more directly
    • And also to not run tests in parrallel
    • and to clean up state files before and after each run
  • our linter requires a test for each module. At the very least run init so that its syntax is checked. See an example here.
  • AWS IAM is eventually consistent and supposedly is homed in us-east-1, so its probably best to run all tests that use IAM in that region.

Test Dependencies

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].