Files
acdl/modules/l1/ecs-cluster
Jon Chery 8145eee8fc feat(P32): deletion-protection-by-default + L2 feature flag (REQ-86, REQ-87)
---ci---
project: acdl
phase: 32
milestone: v1.8
status: execute
---/ci---

- All 11 L1 primitives now have deletion_protection NFR (boolean, default true).
- Adapter emits `lifecycle { prevent_destroy = true }` when NFR is true;
  omits it when false. Default is true when NFR is absent.
- L2 composition resolver propagates inputs.deletion_protection to all
  children NFRs. When false, all resources get deletion_protection=false.
- Stack schema updated with optional features object (deletion_protection,
  uptime_enabled).
- Contract schema description updated to document deletion_protection
  and uptime_enabled inputs.

Tests: +5 (307 -> 312). All pass.
2026-07-22 22:12:42 +00:00
..

ecs-cluster — ECS Fargate cluster

Module kind: primitive | Version: 1.0.0

An ECS Fargate cluster. The simplest ECS module — one resource, two inputs, two outputs. The cluster is the container orchestration boundary that ecs-service references for task placement.

Resources

Resource Type Purpose
cluster aws_ecs_cluster The ECS Fargate cluster

Inputs

Name Type Required Default Description
name string yes The ECS cluster name
region string yes AWS region the cluster is created in

Outputs

Name Type Description
cluster_arn arn The ECS cluster ARN
cluster_id string The ECS cluster id (name)

Usage

{
  "id": "cluster",
  "type": "aws:ecs:cluster",
  "module": "ecs-cluster@1.0.0",
  "inputs": {
    "name": "acdl-microservice",
    "region": "us-east-1"
  }
}

The cluster_arn output is referenced by ecs-service as its cluster_arn input.

Compliance extension points

  • Container Insights — add configuration { container_insights = "enabled" } for observability (SOC2 CC7.3, DORA ICT risk monitoring).
  • CloudWatch Logs — add a log group with retention policy for cluster-level audit logs (SOX, SOC2 CC7.2, HIPAA §164.312(b)).
  • Encryption — add settings { name = "containerInsights", value = "enabled" } and KMS-based encryption for container data (HIPAA §164.312(a)(2)(iv), GDPR Art.32).

Examples

Validated example contracts are in examples/. The platform-test pipeline validates them against schemas/contract.schema.json.

Simple

A minimal deployment:

examples/simple.yaml

uses: acdl/pipelines/deploy.yaml@v1.6
module: ecs-cluster
environment: dev
inputs:
  name: my-cluster
  region: us-east-1

Complex

A production deployment with optional inputs:

examples/complex.yaml

# Complex ECS cluster with container insights
uses: acdl/pipelines/deploy.yaml@v1.6
module: ecs-cluster
environment: dev
inputs:
  name: my-production-cluster
  region: us-east-1

Versioning

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.