Public repository for reusable Terraform infrastructure modules designed for production use. Contains 50+ well-tested, production-ready Terraform modules for managing cloud infrastructure across AWS, Azure, and GCP. All modules are designed to work without requiring cloud credentials during CI/CD testing, making them safe and easy to validate.
Key Innovation: Credential-less testing philosophy - all tests run in GitHub Actions without AWS/cloud credentials using mock provider configurations.
| File | Description |
|---|---|
README.md |
User-facing documentation with quick start guide |
AI_README.md |
Comprehensive guide for AI assistants and developers |
DOCUMENTATION_GUIDELINES.md |
CRITICAL - Ultra-minimal README structure rules (read before writing docs) |
LICENSE |
Project license |
Makefile |
Local development commands (test, fmt, validate, lint, security) |
test-workflow.sh |
Automated test discovery and execution script |
.pre-commit-config.yaml |
Git hooks for automated validation |
.tflint.hcl |
TFLint configuration with AWS plugin |
| Directory | Purpose |
|---|---|
terraform/ |
Main module registry with 50+ production-ready modules (see terraform/AGENTS.md) |
.github/ |
CI/CD workflows and GitHub Actions automation (see .github/AGENTS.md) |
.claude/ |
Claude AI configuration and custom skills |
- Total Directories: 180+
- Total Files: 388
- Total Terraform Modules: 50
- Test Coverage: 49/50 modules (98%)
- Directory Depth: 4 levels
| Category | Count |
|---|---|
| Networking | 7 |
| Compute | 4 |
| ECS Containers | 5 |
| EKS Kubernetes | 7 |
| Load Balancing | 3 |
| Serverless | 3 |
| Databases/Storage | 4 |
| Monitoring/Logging | 4 |
| CI/CD | 2 |
| Messaging | 3 |
| IAM/Security | 3 |
| Multi-Cloud | 4 |
| Composite Stacks | 1 |
Before making ANY changes:
- Read DOCUMENTATION_GUIDELINES.md - Contains strict README structure rules
- Never duplicate code in README - Reference
tests/directories instead - Keep README features ≤8 items - Ultra-minimal documentation philosophy
- Tests are the documentation - All examples live in
tests/directories
When adding a new module:
- Create standard structure:
main.tf,variables.tf,outputs.tf,README.md,tests/basic/main.tf - Follow ultra-minimal README structure from DOCUMENTATION_GUIDELINES.md
- Add mock provider configuration to test files
- Run
make testbefore committing
When modifying an existing module:
- Read module code + test cases first
- Make changes and run
terraform fmt -recursive terraform/ - Test locally:
make test-module MODULE=<name> - Verify all tests still pass
- Update README only if inputs/outputs changed
All tests MUST:
- Use mock provider configuration (no real AWS credentials)
- Run
terraform plansuccessfully - Be auto-discoverable at
terraform/**/tests/*/main.tf - Include realistic values even though resources won't be created
Local testing commands:
See Makefile for all available commands:
make fmt- Format all Terraform codemake test- Run all checks (fmt, validate, lint, security)make test-module MODULE=<name>- Test specific module
Mock Provider (required in ALL test files):
provider "aws" {
region = "us-east-1"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
access_key = "test"
secret_key = "test"
}Security defaults:
- Enable encryption by default where applicable
- Block public access by default for data stores
- Never commit real credentials or sensitive data
Anti-patterns to avoid:
- Don't create infrastructure without tests
- Don't write verbose READMEs (see DOCUMENTATION_GUIDELINES.md)
- Don't duplicate code examples in README - reference tests/ instead
- Don't commit without running
make test
- All modules are self-contained and independently usable
- Composite stacks (in
terraform/stack/) combine multiple modules - See individual module READMEs for inter-module dependencies
Required:
- Terraform >= 1.0
- Git
Optional (for local development):
- pre-commit - Git hook framework
- TFLint - Terraform linter (with AWS plugin)
- trivy - Security scanner
- terraform-docs - Documentation generator
Installation:
See README.md for installation instructions or run make install-tools (macOS).
hashicorp/aws~> 5.0 (primary)hashicorp/azurerm(for Azure modules)hashicorp/google(for GCP modules)
See .github/AGENTS.md for detailed workflow documentation.
Summary:
- Terraform format, validate, lint, and security checks on every PR
- Auto-discovers and tests all modules without cloud credentials
- Pre-commit hooks for local validation
This repository consolidates Terraform modules from the chatops-platform repository. The workflows and module structure are designed to work identically, with improved auto-discovery and testing capabilities.