A library of self-contained Terraform examples: reusable patterns, illustrations for blog/LinkedIn posts, and starting points for live tech sessions ("Matinale Tech").
Each example lives under examples/ and is fully independent - its own README.md, tooling (mise.toml, .tflint.hcl) and Terraform code. Pick one, cd into it, follow its README. The toolchain (terraform, tflint, trivy) is managed by mise as the single source of truth - see AGENTS.md.
| Example | Type | Tags | Description |
|---|---|---|---|
aws-multi-env |
pattern |
aws multi-env backend workspaces |
Four progressive patterns for managing multiple environments with Terraform CE on AWS. |
terraform-deferred-actions |
experiment |
rc deferred-actions kms unknown-at-plan |
Testing Terraform's experimental deferred actions (plan -allow-deferral) to inject a KMS key whose ARN is unknown at plan time. |
terraform-query-import |
lab |
aws query import tfquery v1.14 |
Discover unmanaged infrastructure with terraform query + list blocks, generate its config, and import it in bulk. |
terraform-module-testing |
lab |
aws terraform-test testing s3 validation |
Test a reusable S3 module with the native terraform test framework: variable validations (expect_failures), plan assertions with mock_provider, real apply on AWS, and parallel runs with state_key. |
pattern- reusable, production-leaning reference.lab- starting point / TP with progressive steps for a live session.experiment- preview/RC features, may be intentionally unstable.
See the golden path in AGENTS.md. In short: create examples/<name>/ with its own README.md, mise.toml, .tflint.hcl and Terraform root module(s), then add a row to the catalogue above. CI auto-discovers any directory containing providers.tf - no CI change needed.
- Git flow: GitHub flow (short-lived branches off
main, PR review, squash-merge). - Commits: Conventional Commits; use the example name as scope (
feat(aws-multi-env): ...). - Versioning: SemVer, repo-level single release line via release-please.
- Validation before commit:
terraform fmt -recursive(root) andterraform validateinside each touched root module.