Skip to content

Commit

Permalink
add in the capcity providers
Browse files Browse the repository at this point in the history
  • Loading branch information
keirbadger committed Apr 9, 2024
1 parent c28fac9 commit d33460b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ module "ecs_update_monitor" {
}

locals {
# capacity_providers = var.image_build_details["buildx"] == "true" && strcontains(var.image_build_details["platforms"], "arm64") ? [
# {
# capacity_provider = "${var.ecs_cluster}-native-scaling-graviton"
# weight = 1
# },
# ] : [
# {
# capacity_provider = "${var.ecs_cluster}-native-scaling"
# weight = 1
# },
# ]
capacity_providers = var.image_build_details["buildx"] == "true" && can(regexall("^arm64", var.image_build_details["platforms"])) ? [
{
capacity_provider = "${var.ecs_cluster}-native-scaling"
weight = 1
},
] : [
{
capacity_provider = "${var.ecs_cluster}-native-scaling"
weight = 1
},
]
}

module "service" {
Expand All @@ -46,7 +46,7 @@ module "service" {
network_configuration_security_groups = var.network_configuration_security_groups
pack_and_distinct = var.pack_and_distinct
health_check_grace_period_seconds = var.health_check_grace_period_seconds
# capacity_providers = local.capacity_providers
capacity_providers = local.capacity_providers
}

module "taskdef" {
Expand Down

0 comments on commit d33460b

Please sign in to comment.