Skip to content
Aleksej Komnenovic edited this page Jun 30, 2026 · 3 revisions

GoRules Terraform Module Library

Terraform modules for deploying GoRules on AWS ECS Fargate. One root module (aws/) wires up four child modules.

What is GoRules?

GoRules has two components:

  • BRMS: Full management UI + API for authoring rules. Requires database + storage + HTTPS.
  • Agent: Stateless rule execution engine. Requires storage only.

Module Architecture

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

Topics

Deployment Patterns

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

Tech Stack

  • 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

Design Patterns

  1. Null-disabling: Set a component to null to disable it entirely
  2. Conditional count: All child modules use count = local.create_X ? 1 : 0
  3. Structured objects: Top-level variables are typed object({}) with optional() attributes
  4. Extensive validation: Regex, range, cross-field, and Fargate CPU/memory matrix validations
  5. Cross-module wiring: Done in the Root Module's main.tf

Clone this wiki locally