EXECUTE stage. Authors the remaining 11 L1 module terraform subdirs with the full versions/variables/locals/main/outputs split. Defaults previously hardcoded in the adapter move into locals.tf. Simple single-resource modules (7): - kms-key: aws_kms_key + alias (enable_key_rotation, deletion_window defaults) - ecr: aws_ecr_repository (encryption_configuration from kms_key_arn, image_scanning) - ecs-cluster: aws_ecs_cluster (name default) - iam-role: aws_iam_role + inline_policy (assume_role_policy fallback, ECR/logs policy in locals.tf) - rds: aws_db_instance (storage_encrypted, multi_az, kms_key_arn defaults) - waf: aws_wafv2_web_acl (default_action, visibility_config, dynamic rules) - uptime: aws_ecs_task_definition + aws_ecs_service (Fargate compat, container_definitions in locals.tf) Multi-resource modules with intra-refs (4): - vpc: aws_vpc + aws_subnet + aws_internet_gateway + aws_route_table (CIDR derivation in locals.tf) - ecs-service: aws_ecs_task_definition + aws_ecs_service (Fargate compat, container_definitions, network_config in locals.tf) - alb: aws_lb + aws_lb_target_group + aws_lb_listener (subnet/security_group list derivation in locals.tf) - cloudfront: aws_cloudfront_distribution + aws_cloudfront_origin_access_control (OAC defaults in locals.tf) Registry: terraform_dir added to all 11 remaining entries. Adapter fix: stack output format uses separate 'from' + 'output' fields (not 'from': 'rid.output'). Fixed _emit_root_output to read both fields. 6 previously-skipped tests unblocked (run_platform.sh --check-only now resolves static-assets.yml through the new module-assembled adapter). Removed skip markers. Fixed test assertion (aws_s3_bucket → module). Regression: 461 passed, 0 skipped, 5 deselected (slow). All 12 modules pass run_primitive_plan.sh --check-only. All 12 terraform/ subdirs pass terraform init + validate standalone. ---ci--- project: acdl phase: P56b milestone: v1.11 status: execute ---/ci---
rds — RDS database instance
Module kind: primitive | Version: 1.0.0
An RDS database instance. Supports multiple database engines (postgres,
mysql, mariadb, sqlserver, oracle) via the engine input. The adapter
translates the engine-agnostic aws:rds:instance stack type to the
Terraform aws_db_instance resource.
Resources
| Resource | Type | Purpose |
|---|---|---|
rds |
aws_db_instance |
The RDS database instance |
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
engine |
string | yes | — | Database engine (postgres, mysql, mariadb, sqlserver-ex, sqlserver-web, sqlserver-se, oracle-se2) |
engine_version |
string | yes | — | Engine version (e.g. 16.4 for postgres, 8.4 for mysql) |
instance_class |
string | yes | db.t3.micro |
RDS instance class (e.g. db.t3.micro, db.r6g.large) |
allocated_storage |
number | no | 20 | Allocated storage in GB |
db_name |
string | yes | — | The database name (some engines have restrictions) |
username |
string | yes | — | Master username |
multi_az |
boolean | no | false | Multi-AZ deployment |
storage_encrypted |
boolean | no | true | Enable storage encryption |
region |
string | yes | — | AWS region the RDS instance is created in |
Outputs
| Name | Type | Description |
|---|---|---|
db_endpoint |
string | The RDS instance endpoint (host:port) |
db_arn |
arn | The RDS instance ARN |
NFRs
| Name | Type | Default | Description |
|---|---|---|---|
backup_retention_period |
number | 7 | Backup retention period in days |
deletion_protection |
boolean | true | Enable deletion protection (default true for prod) |
Usage
{
"id": "rds",
"type": "aws:rds:instance",
"module": "rds@1.0.0",
"inputs": {
"engine": "postgres",
"engine_version": "16.4",
"instance_class": "db.t3.micro",
"allocated_storage": 20,
"db_name": "acdl_db",
"username": "acdl_admin",
"multi_az": false,
"storage_encrypted": true,
"region": "us-east-1"
},
"nfrs": {
"backup_retention_period": 7,
"deletion_protection": true
}
}
A concrete instance is at instance.json (used by the platform pipeline
as the regression baseline).
Compliance extension points
- KMS encryption — add a customer-managed KMS key for storage
encryption (
kms_key_idargument) (SOC2 CC6.1, GDPR Art.32). - Automated backups — the
backup_retention_periodNFR controls automated backup retention; extend with backup windows + copy tags to another region for DR (SOX ITGC, DORA operational resilience). - Audit logging via CloudTrail — RDS does not emit CloudTrail events
for data-plane access; add
aws_db_instance_automated_backups_replication- CloudWatch Logs for database audit (SOX, SOC2 CC7.2).
- IAM database authentication — add
iam_database_authentication_enabled = trueso IAM users/roles can authenticate to the database without long-lived passwords (SOC2 CC6.1). - Read replicas — add
aws_db_instancewithreplicate_source_dbfor read scaling and DR failover (SOC2 CC9.1, DORA operational resilience).
Examples
Validated example contracts are in examples/. The platform-test
pipeline validates them against schemas/contract.schema.json.
Simple
A minimal deployment:
environment: dev
id: rds
infrastructure:
rds:
inputs:
allocated_storage: 20
db_name: my_app_db
engine: postgres
engine_version: '16.4'
instance_class: db.t3.micro
region: us-east-1
username: db_admin
version: 1.0.0
name: rds-instance
Complex
A production deployment with optional inputs:
environment: dev
id: rds
infrastructure:
rds:
inputs:
allocated_storage: 100
db_name: my_production_db
engine: postgres
engine_version: '16.4'
instance_class: db.r6g.large
multi_az: true
region: us-east-1
storage_encrypted: true
username: db_admin
version: 1.0.0
name: rds-instance
Multi-engine variation
RDS supports multiple database engines. The engine input selects the engine;
the engine_version must match.
PostgreSQL
examples/simple.yml — postgres 16.4
MySQL
examples/mysql.yml — mysql 8.4
environment: dev
id: rds
infrastructure:
rds:
inputs:
allocated_storage: 20
db_name: my_mysql_db
engine: mysql
engine_version: '8.4'
instance_class: db.t3.micro
region: us-east-1
username: db_admin
version: 1.0.0
name: rds-instance
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.