-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Aleksej Komnenovic edited this page Jun 30, 2026
·
3 revisions
Terraform modules for deploying GoRules on AWS ECS Fargate. One root module (aws/) wires up four child modules.
GoRules has two components:
- BRMS: Full management UI + API for authoring rules. Requires database + storage + HTTPS.
- Agent: Stateless rule execution engine. Requires storage only.
The Root Module is the single entry point. It conditionally instantiates:
| Module | Purpose | Conditional On |
|---|---|---|
| VPC Module | Networking infrastructure | vpc.create == true |
| Storage Module | S3 bucket for rule storage | storage != null |
| Database Module | Aurora Serverless v2 PostgreSQL | database != null |
| ECS Module | ECS Fargate services (BRMS + Agent) | brms != null OR agent != null |
- Security Architecture: Network isolation, encryption, TLS
- IAM Architecture: Roles, policies, least-privilege
- Secrets Management: KMS, Secrets Manager, encryption providers
- Variable System: How configuration flows root → child modules
- Certificates and DNS: ACM certificates, Route53 records
- Monitoring and Autoscaling: CloudWatch alarms, auto scaling
- AI LLM Configuration: Optional AI assistant setup
See Deployment Patterns for supported deployment topologies:
- Full Stack (VPC + DB + S3 + BRMS + Agent)
- Agent Only (VPC + S3 + Agent)
- Existing VPC integration
- Multi-environment / cross-account
- Terraform >= 1.14
- AWS Provider >= 6.0
- AWS Services: VPC, ECS Fargate, Aurora Serverless v2, S3, ALB, ACM, Route53, Secrets Manager, KMS, CloudWatch, IAM, Lambda
-
Null-disabling: Set a component to
nullto disable it entirely -
Conditional
count: All child modules usecount = local.create_X ? 1 : 0 -
Structured objects: Top-level variables are typed
object({})withoptional()attributes - Extensive validation: Regex, range, cross-field, and Fargate CPU/memory matrix validations
-
Cross-module wiring: Done in the Root Module's
main.tf