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

Mixing ASG and Fargate capacity providers does not work #68

Closed
1 task done
jcajkovic opened this issue Jun 30, 2022 · 4 comments · Fixed by #69
Closed
1 task done

Mixing ASG and Fargate capacity providers does not work #68

jcajkovic opened this issue Jun 30, 2022 · 4 comments · Fixed by #69
Assignees

Comments

@jcajkovic
Copy link

jcajkovic commented Jun 30, 2022

Description

When trying to use both Fargate and Autoscaling capacity providers I get:

Error: error updating ECS Cluster (dev-main-ecs-cluster) Capacity Providers: InvalidParameterException: A capacity provider strategy cannot contain a mix of capacity providers using Auto Scaling groups and Fargate providers. Specify one or the other and try again.

If your request is for a new feature, please use the Feature request template.

  • ✋ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: 4.0.2

  • Terraform version:

1.0.11
  • Provider version(s):
aws = {
    source  = "hashicorp/aws"
    version = "~> 4.0"
}

Reproduction Code [Required]

module "ecs" {
  source  = "terraform-aws-modules/ecs/aws"
  version = "~> 4.0.2"

  cluster_name = local.cluster_name

  fargate_capacity_providers = {
    FARGATE = {
      default_capacity_provider_strategy = {
        weight = var.fargate_weight
      }
    }
    FARGATE_SPOT = {
      default_capacity_provider_strategy = {
        weight = var.fargate_spot_weight
      }
    }
  }

  autoscaling_capacity_providers = {
    linux = {
      auto_scaling_group_arn         = module.asg_linux.autoscaling_group_arn
      managed_termination_protection = "DISABLED"

      managed_scaling = {
        maximum_scaling_step_size = 5
        minimum_scaling_step_size = 1
        status                    = "ENABLED"
        target_capacity           = 90
      }

      default_capacity_provider_strategy = {
        weight = 60
        base   = 20
      }
    }
    windows = {
      auto_scaling_group_arn         = module.asg_windows.autoscaling_group_arn
      managed_termination_protection = "DISABLED"

      managed_scaling = {
        maximum_scaling_step_size = 2
        minimum_scaling_step_size = 1
        status                    = "ENABLED"
        target_capacity           = 90
      }

      default_capacity_provider_strategy = {
        weight = 40
      }
    }
  }

}

I'm not using workspaces

yes I've cleared local chache

Terminal Output Screenshot(s)

image

@bryantbiggs bryantbiggs self-assigned this Jul 13, 2022
@rich7021
Copy link

Same here, terraform version 1.2.2, module version 4.1.0.

@bryantbiggs
Copy link
Member

yes, apologies - working on a solution for this

@antonbabenko
Copy link
Member

This issue has been resolved in version 4.1.1 🎉

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants