github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/remotetasks/input/ecs.nomad (about)

     1  variable "subnets" {
     2    type        = list(string)
     3    description = "Subnet IDs task will run in."
     4  }
     5  
     6  variable "security_groups" {
     7    type        = list(string)
     8    description = "Security Group IDs task will run in."
     9  }
    10  
    11  job "nomad-ecs-e2e" {
    12    datacenters = ["dc1"]
    13  
    14    group "ecs-remote-task-e2e" {
    15      restart {
    16        attempts = 0
    17        mode     = "fail"
    18      }
    19  
    20      reschedule {
    21        delay = "5s"
    22      }
    23  
    24      task "http-server" {
    25        driver       = "ecs"
    26        kill_timeout = "1m" // increased from default to accomodate ECS.
    27  
    28        config {
    29          task {
    30            launch_type     = "FARGATE"
    31            task_definition = "nomad-rtd-e2e"
    32            network_configuration {
    33              aws_vpc_configuration {
    34                assign_public_ip = "ENABLED"
    35                security_groups  = var.security_groups
    36                subnets          = var.subnets
    37              }
    38            }
    39          }
    40        }
    41      }
    42    }
    43  }