Skip to content

Added remote executor terraform deployment for ECS EC2 launch types#35

Open
max-datahub wants to merge 6 commits intomainfrom
remote-executor-ecs-ec2
Open

Added remote executor terraform deployment for ECS EC2 launch types#35
max-datahub wants to merge 6 commits intomainfrom
remote-executor-ecs-ec2

Conversation

@max-datahub
Copy link

@max-datahub max-datahub commented Sep 26, 2025

  • Dual Launch Type Support: Deploy on either ECS Fargate or EC2
  • Existing Infrastructure Integration: Uses your existing subnets and gateways
  • Minimal Configuration Changes: Backwards compatibility with "FARGATE" launch type is preserved
  • Generated READMEs and docs: Easy to get set up and running with tfvars example files
  • Tested & validated functionality: Both FARGATE and EC2 launch types are confirmed to work with pre-existing subnets

Note

Add EC2 launch type support with supporting infrastructure, refactor inputs/env vars, add outputs, and ship comprehensive examples and docs.

  • Terraform module: remote-ingestion-executor
    • Add dual launch type support with launch_type (EC2 or FARGATE) and ec2_config inputs.
    • Introduce modules/ec2-infrastructure to provision EC2 instance, IAM, SG, and use existing private subnets; expose outputs consumed by service.
    • Update main.tf to conditionally wire subnets/SGs for EC2, disable public IP on EC2, and pass launch_type to ecs_service.
    • Add enable_autoscaling input; replace environment with env_vars; remove requires_compatibilities usage.
    • Fix executor env var mapping between executor_id and executor_pool_id.
    • Add module outputs: cluster_name, cluster_arn, service_name, task_definition_arn, plus EC2-only private_subnet_ids, instance_id.
    • Bump ECS module versions to 5.9.2.
  • Examples & docs
    • Add examples/ with README.md, main.tf, and .tfvars.example for Fargate and EC2; expand top-level README.md with quick start, architecture, and updated inputs/outputs.

Written by Cursor Bugbot for commit 5d62d4f. This will update automatically on new commits. Configure here.

@cursor
Copy link

cursor bot commented Sep 26, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on September 27.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

{
name = (local.version_legacy ? "DATAHUB_EXECUTOR_WORKER_ID" : "DATAHUB_EXECUTOR_POOL_ID")
value = (local.version_legacy ? var.datahub.executor_pool_id : var.datahub.executor_id)
value = (local.version_legacy ? var.datahub.executor_id : var.datahub.executor_pool_id)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Undefined Variable and Executor ID Logic Error

The local.version_legacy variable is referenced but not defined, causing a Terraform compilation error. Additionally, the logic for assigning the executor ID/pool ID value is inverted relative to the environment variable name selection. This inversion may lead to incorrect executor configuration, especially since executor_id is deprecated, potentially impacting existing deployments.

Fix in Cursor Fix in Web

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