a16e6f1bff
EXECUTE stage. Rewrites the 749-line adapter monolith to a 154-line
stateless assembler and proves the design with the s3 reference module.
Stateless adapter (adapters/terraform/adapter.py, 749 → 154 lines):
- Deleted TYPE_MAP, INPUT_MAP, OUTPUT_MAP (3 constant tables).
- Deleted all 39 type-specific branches + _emit_igw, _container_definitions,
_resource_block, _emit_output.
- New adapt(): reads registry.json → terraform_dir → emits root main.tf
with module-instantiation blocks (module "x" { source = ... }) + ref
wiring via module.<rid>.<output> interpolations + root outputs.
- The adapter owns NO resource shape, NO nested blocks, NO defaults, NO
type-specific logic. It only assembles module instantiations and wires refs.
s3 reference terraform module (modules/l1/s3/terraform/):
- versions.tf (required_version + aws ~> 5.0)
- variables.tf (bucket_name, region, kms_key_arn, tags)
- locals.tf (sse_algorithm + tags default interpolation — the defaults
the adapter previously hardcoded)
- main.tf (aws_s3_bucket + versioning + SSE config, referencing local.*)
- outputs.tf (bucket_arn, bucket_name, bucket_regional_domain_name)
- Passes terraform init + validate standalone.
Registry (modules/registry.json): s3 entry gains terraform_dir field.
STANDARDS.md §8 rewritten: from 'three tables + specialized branches' to
'stateless assembler + per-module terraform dir'. §9.4 checklist updated.
§9.1 required-files list updated to include terraform/ subdir.
tests/test_adapter.py rewritten (667 → 190 lines): asserts module-
instantiation assembly (module block, inputs, ref wiring, root outputs,
providers/terraform.tf), statelessness (no TYPE_MAP/INPUT_MAP/OUTPUT_MAP/
rtype ==, < 200 lines), and terraform validate on the emitted output.
Deleted test_p1_1_adapter_parameterization.py (tested the deleted HCL
string emission).
6 pipeline tests skipped (run_platform.sh --check-only defaults to
static-assets.yml which needs cloudfront/waf terraform dirs — P56b).
Regression: 455 passed, 6 skipped, 5 deselected (slow). run_primitive_plan
--check-only s3 exits 0.
---ci---
project: acdl
phase: P56a
milestone: v1.11
status: execute
---/ci---
101 lines
2.4 KiB
JSON
101 lines
2.4 KiB
JSON
{
|
|
"s3": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/s3/interface.json",
|
|
"terraform_dir": "modules/l1/s3/terraform",
|
|
"published_at": "2026-07-21T19:00:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"vpc": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/vpc/interface.json",
|
|
"published_at": "2026-07-21T21:30:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"ecs-cluster": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/ecs-cluster/interface.json",
|
|
"published_at": "2026-07-21T21:30:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"ecs-service": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/ecs-service/interface.json",
|
|
"published_at": "2026-07-21T21:30:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"iam-role": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/iam-role/interface.json",
|
|
"published_at": "2026-07-21T21:30:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"alb": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/alb/interface.json",
|
|
"published_at": "2026-07-21T21:30:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"ecr": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/ecr/interface.json",
|
|
"published_at": "2026-07-21T21:30:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"cloudfront": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/cloudfront/interface.json",
|
|
"published_at": "2026-07-22T19:00:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"waf": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/waf/interface.json",
|
|
"published_at": "2026-07-22T19:00:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"rds": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/rds/interface.json",
|
|
"published_at": "2026-07-22T20:00:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"kms-key": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/kms-key/interface.json",
|
|
"published_at": "2026-07-22T20:00",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"uptime": {
|
|
"1.0.0": {
|
|
"interface": "modules/l1/uptime/interface.json",
|
|
"published_at": "2026-07-22T21:00",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"static-assets": {
|
|
"1.0.0": {
|
|
"interface": "modules/l2/static-assets/composition.json",
|
|
"published_at": "2026-07-22T15:00:00Z",
|
|
"deprecated": false
|
|
}
|
|
},
|
|
"microservice": {
|
|
"1.0.0": {
|
|
"interface": "modules/l2/microservice/composition.json",
|
|
"published_at": "2026-07-22T15:00:00Z",
|
|
"deprecated": false
|
|
}
|
|
}
|
|
} |