phase: 9, status: plan-as-execute, persona: platform-engineer, task: T-9.1..T-9.4
---ci--- project: acdl phase: 9 milestone: v1.1 status: plan-as-execute persona: platform-engineer task: [T-9.1, T-9.2, T-9.3, T-9.4] requirements.covered: [REQ-24] ---/ci--- Wave 1: the IR-typed L1 module l1-s3. - T-9.1: modules-ir/l1/l1-s3/interface.json - the L1 interface contract (typed inputs bucket_name/region, outputs bucket_arn/bucket_name, NFR versioning; type aws:s3:bucket). Per D-P09-2 this is a contract (typed declarations), NOT an IR-schema instance. - T-9.2: modules-ir/l1/l1-s3/spike_instance.json - a concrete stack instance with values (bucket_name=acdl-spike-bucket, region=us-east-1) that validates against schemas/ir.schema.json (verified). - T-9.3: modules-ir/registry.json - the L1 registry, one entry l1-s3@1.0.0 -> interface.json (D-P09-3, co-located with modules-ir/). - T-9.4: modules-ir/l1/l1-s3/README.md - the L1 doc + the IR->Terraform mapping table the adapter performs. Spike instance validates against ir.schema.json; interface + registry valid JSON.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# l1-s3 — S3 bucket primitive
|
||||
|
||||
The first real L1 module for the v1.1 spike. Single-purpose,
|
||||
substrate-agnostic (the IR type is `aws:s3:bucket`, not a Terraform
|
||||
resource type).
|
||||
|
||||
## Interface (the IR-typed contract)
|
||||
|
||||
See `interface.json`: inputs `bucket_name` + `region` (strings), outputs
|
||||
`bucket_arn` (arn) + `bucket_name` (string), NFR `versioning` (bool,
|
||||
default true).
|
||||
|
||||
## IR → Terraform mapping (performed by the adapter)
|
||||
|
||||
The Terraform adapter (`adapters/terraform/adapter.py`) translates this
|
||||
L1's IR shape to Terraform:
|
||||
|
||||
| IR | Terraform |
|
||||
|----|-----------|
|
||||
| `resource.type = aws:s3:bucket` | `resource "aws_s3_bucket" "<id>" { ... }` |
|
||||
| `resource.inputs.bucket_name` | `bucket = <value>` arg |
|
||||
| `resource.inputs.region` | `provider "aws" { region = <value> }` |
|
||||
| `resource.outputs.bucket_arn` | `output "bucket_arn" { value = aws_s3_bucket.<id>.arn }` |
|
||||
| `resource.outputs.bucket_name` | `output "bucket_name" { value = aws_s3_bucket.<id>.id }` |
|
||||
|
||||
The adapter is a thin layer (ARCHITECTURE.md §12.2); it does not own L1
|
||||
content — it only translates.
|
||||
|
||||
## Spike instance
|
||||
|
||||
`spike_instance.json` is a concrete stack instance (with values
|
||||
`bucket_name=acdl-spike-bucket`, `region=us-east-1`) that validates
|
||||
against `schemas/ir.schema.json`. The adapter consumes this instance
|
||||
(not the interface contract) to emit Terraform.
|
||||
|
||||
## 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.
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "l1-s3",
|
||||
"version": "1.0.0",
|
||||
"kind": "l1",
|
||||
"type": "aws:s3:bucket",
|
||||
"description": "S3 bucket primitive (substrate-agnostic IR type aws:s3:bucket; the Terraform adapter translates to aws_s3_bucket).",
|
||||
"inputs": {
|
||||
"bucket_name": {
|
||||
"type": "string",
|
||||
"description": "Globally-unique S3 bucket name.",
|
||||
"required": true
|
||||
},
|
||||
"region": {
|
||||
"type": "string",
|
||||
"description": "AWS region the bucket is created in.",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"outputs": {
|
||||
"bucket_arn": {
|
||||
"type": "arn",
|
||||
"description": "The S3 bucket ARN."
|
||||
},
|
||||
"bucket_name": {
|
||||
"type": "string",
|
||||
"description": "The bucket name (echoes the input)."
|
||||
}
|
||||
},
|
||||
"nfrs": {
|
||||
"versioning": {
|
||||
"type": "boolean",
|
||||
"description": "Enable S3 versioning (default true).",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"stack": {
|
||||
"name": "l1-s3",
|
||||
"kind": "l1",
|
||||
"depth": 1
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"id": "s3",
|
||||
"type": "aws:s3:bucket",
|
||||
"module": "l1-s3@1.0.0",
|
||||
"inputs": {
|
||||
"bucket_name": "acdl-spike-bucket",
|
||||
"region": "us-east-1"
|
||||
},
|
||||
"outputs": {
|
||||
"bucket_arn": {"type": "arn", "description": "The S3 bucket ARN."},
|
||||
"bucket_name": {"type": "string", "description": "The bucket name."}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"l1-s3": {
|
||||
"1.0.0": {
|
||||
"interface": "modules-ir/l1/l1-s3/interface.json",
|
||||
"published_at": "2026-07-21T19:00:00Z",
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user