Skip to content

Commit 42f11fe

Browse files
authored
fix: Local cluster_name error when var.cluster_arn is empty (#218)
fix: `cluster_name` error when `var.cluster_arn` is empty
1 parent 048acce commit 42f11fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ resource "aws_ecs_task_set" "ignore_task_definition" {
12031203
locals {
12041204
enable_autoscaling = local.create_service && var.enable_autoscaling && !local.is_daemon
12051205

1206-
cluster_name = element(split("/", var.cluster_arn), 1)
1206+
cluster_name = try(element(split("/", var.cluster_arn), 1), "")
12071207
}
12081208

12091209
resource "aws_appautoscaling_target" "this" {

0 commit comments

Comments
 (0)