cloudposse / terraform-aws-ecs-container-definition

Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource
https://cloudposse.com/accelerate
Apache License 2.0
340 stars 245 forks source link

ecs_task_definition add support for ephemeral_storage #138

Closed haarchri closed 3 years ago

haarchri commented 3 years ago

Describe the Feature

ecs_task_definition add support for ephemeral_storage

Use Case

use ephemeral_storage 21-200GB in ECS

Describe Ideal Solution

as of PR approved & merged please add ephemeral_storage https://github.com/hashicorp/terraform-provider-aws/pull/19694

korenyoni commented 3 years ago

@haarchri was there a particular reason you closed this issue?

haarchri commented 3 years ago

was a fault :/

korenyoni commented 3 years ago

@haarchri after doing some development on this module it dawned on me that ephemeralStorage is outside the scope of the container definition.

See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html

What you would actually do is something like this:

module "container" {
  source  = "cloudposse/ecs-container-definition/aws"
  version = "0.56.0"
  # insert the 33 required variables here
}

resource "aws_ecs_task_definition" "task" {
  family = "foo"
  container_definitions = module.container.json_map_encoded_list

  ephemeral_storage {
    size_in_gb = 30
  }
}
ikarlashov commented 2 years ago

@korenyoni Just came across that there's a typo (or value has changed since your publication). Correct param name is sizeingib****.

resource "aws_ecs_task_definition" "task" {
  family = "foo"
  container_definitions = module.container.json_map_encoded_list

  ephemeral_storage {
    size_in_gib = 30
  }
}