Skip to content

Terraform AWS generator #46

@mathieusouflis

Description

@mathieusouflis

Problem statement

Developers deploying to AWS need Terraform infrastructure setup. Writing VPC, ECS, RDS, IAM from scratch is complex and error-prone. There is no dot support for infrastructure-as-code.

Proposed solution

Implement TerraformAWSGenerator in generators/common/terraform_aws.go.

  • Name(): "common-terraform-aws"
  • Language(): "*"
  • Modules(): ["terraform-aws"]

Apply() generates infrastructure/ with Terraform modules:

  • vpc.tf — VPC, subnets, security groups
  • ecs.tf — ECS cluster + task definition
  • rds.tf — only if postgres module is present (spec.HasModule("postgres"))
  • elasticache.tf — only if redis module is present
  • ecr.tf — ECR repository
  • iam.tf — IAM roles and policies
  • variables.tf, outputs.tf, main.tf
  • README.md — setup and apply instructions

Alternatives considered

Use CDK instead of Terraform. Terraform is more language-agnostic and more widely adopted for infrastructure work across teams.

Area

Core

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions