Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed creating ECS Task Definition with bind volume #174

Closed
siarheirdn opened this issue Oct 1, 2022 · 0 comments · Fixed by #176
Closed

failed creating ECS Task Definition with bind volume #174

siarheirdn opened this issue Oct 1, 2022 · 0 comments · Fixed by #176
Labels
bug 🐛 An issue with the system

Comments

@siarheirdn
Copy link

siarheirdn commented Oct 1, 2022

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Error: failed creating ECS Task Definition: ClientException: Fargate compatible task definitions do not support sourcePath
I do not have sourcePath value in my code. If

Expected Behavior

ECS service with bind volumes

Steps to Reproduce

module "container_definition_mysql" {
  source          = "registry.terraform.io/cloudposse/ecs-container-definition/aws"
  version         = "0.58.1"
  container_name  = "mysql"
....


module "ecs_core_service" {
  source             = "registry.terraform.io/cloudposse/ecs-alb-service-task/aws"
  version            = "0.66.2"
  name               = "taskname"
  container_definition_json =  module.container_definition_mysql.json_map_object
  runtime_platform = [{
    operating_system_family = "LINUX"
    cpu_architecture        = "X86_64"
  }]
  network_mode        = "awsvpc"
  launch_type         = "FARGATE"
  scheduling_strategy = "REPLICA"
  bind_mount_volumes = [{
    name      = "service-storage"
    host_path = "/var/logs"
  }]

Error

│ Error: failed creating ECS Task Definition (taskname): ClientException: Fargate compatible task definitions do not support sourcePath
│ 
│   with module.core-application.module.ecs_core_service.aws_ecs_task_definition.default[0],
│   on .terraform/modules/core-application.ecs_core_service/main.tf line 40, in resource "aws_ecs_task_definition" "default":
│   40: resource "aws_ecs_task_definition" "default" {
│ 

versions

aws provider 4.33
terraform 1.3.1
ecs fargate cluster 1.4.0

@siarheirdn siarheirdn added the bug 🐛 An issue with the system label Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant