Files
acdl/modules-ir/l1/l1-alb/README.md
T
Jon Chery 4ed2542ecf docs(P13): plan-as-execute + verify (v1.2.3)
---ci---
project: acdl
phase: 13
milestone: v1.2
status: verify
verdict: VERIFIED
requirements:
  covered: [REQ-31]
---/ci---

Phase 13 plan-as-execute + verify. scripts/verify_phase13.sh green.
6 ECS L1s authored + registered (l1-vpc, l1-ecs-cluster, l1-ecs-service,
l1-iam-role, l1-alb, l1-ecr). Adapter generalized to table-driven
TYPE_MAP (12 IR types) + INPUT_MAP + OUTPUT_MAP. S3 regression: the v1.1
spike l1-s3 produces byte-identical main.tf. Ready to ship v1.2.3.
2026-07-21 21:05:48 +00:00

2.6 KiB

l1-alb — Application Load Balancer primitive (multi-resource L1)

An L1 module for an Application Load Balancer (load balancer + target group + listener). Substrate-agnostic (the IR types are aws:elbv2:loadbalancer, aws:elbv2:listener, aws:elbv2:targetgroup, not Terraform resource types). This is a multi-resource L1: the interface declares the group's inputs/outputs plus a resources array listing the IR types it emits. The IR instance (Phase 14/15) will have multiple resources entries all with module: "l1-alb@1.0.0".

Interface (the IR-typed contract)

See interface.json: inputs name (string), subnets (string, comma-separated, ref to l1-vpc), security_group (string), port (number, default 80), protocol (string, default "HTTP"), region (string); outputs lb_arn (arn) + listener_arn (arn) + target_group_arn (arn); no NFRs.

The resources array lists the emitted IR types:

  • aws:elbv2:loadbalancer — application load balancer in the VPC subnets.
  • aws:elbv2:targetgroup — target group for the ECS service tasks.
  • aws:elbv2:listener — listener forwarding the LB port to the target group.

IR → Terraform mapping (performed by the adapter)

The Terraform adapter (adapters/terraform/adapter.py) translates each emitted IR resource to Terraform:

IR Terraform
resource.type = aws:elbv2:loadbalancer resource "aws_lb" "<id>" { ... }
resource.inputs.name name = <value> arg
resource.inputs.subnets subnets = [<value>] arg (comma-split)
resource.inputs.security_group security_groups = [<value>] arg (comma-split)
resource.outputs.lb_arn output "lb_arn" { value = aws_lb.<id>.id }
resource.type = aws:elbv2:targetgroup resource "aws_lb_target_group" "<id>" { ... }
resource.inputs.port port = <value> arg
resource.inputs.protocol protocol = <value> arg
resource.outputs.target_group_arn output "target_group_arn" { value = aws_lb_target_group.<id>.arn }
resource.type = aws:elbv2:listener resource "aws_lb_listener" "<id>" { ... }
resource.inputs.lb_arn load_balancer_arn = <value> arg (identity)
resource.inputs.port port = <value> arg
resource.inputs.protocol protocol = <value> arg
resource.outputs.listener_arn output "listener_arn" { value = aws_lb_listener.<id>.id }

The adapter is a thin layer (ARCHITECTURE.md §12.2); it does not own L1 content — it only translates.

Versioning (W3.D)

1.0.0 — interface MAJOR, behavior MINOR, lifecycle PATCH. MAJOR bumps require a new registry entry (immutable publication); old entries enter a 12-month deprecation window.