Skip to content

Commit

Permalink
fix: cluster_name error when var.cluster_arn is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rvaralda committed Aug 7, 2024
1 parent 048acce commit 615d423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ resource "aws_ecs_task_set" "ignore_task_definition" {
locals {
enable_autoscaling = local.create_service && var.enable_autoscaling && !local.is_daemon

cluster_name = element(split("/", var.cluster_arn), 1)
cluster_name = try(element(split("/", var.cluster_arn), 1), "")
}

resource "aws_appautoscaling_target" "this" {
Expand Down

0 comments on commit 615d423

Please sign in to comment.