hashicorp / waypoint

A tool to build, deploy, and release any application on any platform.
https://waypointproject.io
Other
4.76k stars 327 forks source link

ECS Task Plugin Required Fields #3514

Open paladin-devops opened 2 years ago

paladin-devops commented 2 years ago

Describe the bug AWS ECS tasks fail to launch for remote operations when subnets and security_group_id configurations are not set, but they are optional configurations.

Steps to Reproduce

  1. Install Waypoint to AWS ECS
  2. Set up a project with remote operations/polling enabled
  3. Observe the failing polling operations with waypoint job list

Inspect jobs in the Waypoint server which attempted remote ops:

$ ./waypoint job inspect 01G6V28968RYE9ZB6N3TGGRB5D

» Job Configuration
             ID: 01G6V28968RYE9ZB6N3TGGRB5D
      Operation: WatchTask
  Target Runner: *
      Workspace: default
        Project: example-nodejs

» Job Results
          State: Error
  Error Message: Job dependency "01G6V289685V52YKJNSMVXPT2E" errored: InvalidParameterException: subnet cannot be blank.

$ ./waypoint job inspect 01G6V3989S66R2BP0SYP3V0XY9

» Job Configuration
             ID: 01G6V3989S66R2BP0SYP3V0XY9
      Operation: StartTask
  Target Runner: *
      Workspace: default
        Project: example-nodejs

» Job Results
          State: Error
  Complete Time: 1 minute ago
  Error Message: InvalidParameterException: security group cannot be blank.

Default ECS runner profile plugin configuration:

{
    "cluster": "waypoint-server",
    "execution_role_name": "waypoint-server-execution-role",
    "log_group": "waypoint-runner-logs",
    "odr_cpu": "512",
    "odr_memory": "2048",
    "region": "my-region",
        "task_role_name": "waypoint-runner"
}

Expected behavior Remote operations work with ECS ODRs without the subnets & security_group_id configurations set, OR the documentation is updated to mark them as required, and we supply a default value for the bootstrapped runner profile for these configurations so that remote operations work immediately.

evanphx commented 2 years ago

We need to update the docs to say that the subnets and security_group_id are required, not optional, since they are in fact, required.