Skip to content

feat(infrastructure): add the ecs ec2 terraform casting - #174

Open
Nageshbansal wants to merge 1 commit into
feat/runnerfrom
feat/infrastructure/ecsec2terraform
Open

feat(infrastructure): add the ecs ec2 terraform casting#174
Nageshbansal wants to merge 1 commit into
feat/runnerfrom
feat/infrastructure/ecsec2terraform

Conversation

@Nageshbansal

@Nageshbansal Nageshbansal commented Jul 29, 2026

Copy link
Copy Markdown
Member

Features

  • Adds the ecs/ec2/terraform infrastructure casting: a VPC with public and private subnets and their routing, an ECS cluster, node groups per storage class, and the IAM the nodes assume.
  • Runs a persistent group as individual instances, each with its own volume mounted at /var/lib/foundry. The ECS agent will not register a node whose volume is not mounted, so a task can never bind onto the root disk.
  • Runs an ephemeral group as an autoscaling group behind a launch template.
  • Registers each node with the substrate's name and its storage class as ECS instance attributes, which is what an Installation places against.
  • Pours cloud-init beside the terraform and references it with filebase64.
  • Templates interpolate the derived resources map and assemble no name or tag of their own.
  • Adds the example under docs/examples/ecs/ec2/terraform/infrastructure/.

Tests

  • Forge tests for the poured set and the cloud-init contents, enricher tests, and template render tests.

Example

apiVersion: v1alpha1
kind: Infrastructure
metadata:
  name: foundry
spec:
  deployment:
    platform: ecs
    mode: ec2
    flavor: terraform
  resource:
    spec:
      config:
        data:
          resource.yaml: |
            networking:
              networkCIDR: 10.0.0.0/16
              subnets:
                private-a:
                  type: private
                  zone: us-east-1a
                  cidr: 10.0.0.0/19
                public-a:
                  type: public
                  zone: us-east-1a
                  cidr: 10.0.96.0/22
            instanceGroups:
              persistent:
                minSize: 3
                maxSize: 3
                machineType: t3.medium
                dataVolume:
                  size: 5
              ephemeral:
                machineType: t3.small
  patches:
    - target: "infrastructure/variables.tf.json"
      type: jsonpatch
      operations:
        - op: replace
          path: /variable/aws_region/default
          value: us-east-1

Related: SigNoz/platform-pod#2743

@Nageshbansal
Nageshbansal force-pushed the feat/infrastructure/ecsec2terraform branch from 8c7fbcf to 1d5e46a Compare August 6, 2026 13:19
Base automatically changed from feat/infrastructure/scaffolding to main August 12, 2026 10:15
@Nageshbansal
Nageshbansal force-pushed the feat/infrastructure/ecsec2terraform branch from cbe5928 to e5219d3 Compare August 31, 2026 18:31
@Nageshbansal
Nageshbansal changed the base branch from main to feat/runner August 31, 2026 18:32
@Nageshbansal
Nageshbansal force-pushed the feat/infrastructure/ecsec2terraform branch from e5219d3 to cfde49c Compare September 1, 2026 09:24
@Nageshbansal
Nageshbansal force-pushed the feat/runner branch 2 times, most recently from 9e86648 to 52024fb Compare September 3, 2026 15:57
Provisions the substrate an ECS installation runs on: a VPC with public and
private subnets and their routing, an ECS cluster, node groups per storage
class, and the IAM the nodes assume. Node groups register with the substrate's
name and their storage class as instance attributes, which is what a workload
places against.

Terraform runs through the terraform runner, and its state anchors beside the
casting document so a regenerated pour never orphans it.

Templates render an identifier from a name-grammar key, so a key composed into
a Terraform identifier respells its hyphens without two keys ever colliding.

(cherry picked from commit d87c2a1da17d26bc40d493a4df59edf64546f166)
@Nageshbansal
Nageshbansal force-pushed the feat/infrastructure/ecsec2terraform branch from cfde49c to 324906a Compare September 4, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant