github.com/hernad/nomad@v1.6.112/e2e/terraform/ecs.tf (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  # Nomad ECS Remote Task Driver E2E
     5  resource "aws_ecs_cluster" "nomad_rtd_e2e" {
     6    name = "nomad-rtd-e2e"
     7  }
     8  
     9  resource "aws_ecs_task_definition" "nomad_rtd_e2e" {
    10    family                = "nomad-rtd-e2e"
    11    container_definitions = file("ecs-task.json")
    12  
    13    # Don't need a network for e2e tests
    14    network_mode = "awsvpc"
    15  
    16    requires_compatibilities = ["FARGATE"]
    17    cpu                      = 256
    18    memory                   = 512
    19  }
    20  
    21  data "template_file" "ecs_vars_hcl" {
    22    template = <<EOT
    23  security_groups = ["${aws_security_group.clients.id}"]
    24  subnets         = ["${data.aws_subnet.default.id}"]
    25  EOT
    26  }
    27  
    28  resource "local_file" "ecs_vars_hcl" {
    29    content         = data.template_file.ecs_vars_hcl.rendered
    30    filename        = "${path.module}/../remotetasks/input/ecs.vars"
    31    file_permission = "0664"
    32  }