locals {
  container_definitions = jsonencode([{
    name      = "uptime-kuma"
    image     = var.container_image
    essential = true
    portMappings = [{
      containerPort = 3001
      hostPort      = 3001
      protocol      = "tcp"
    }]
  }])

  subnet_list = var.subnets != "" ? split(",", var.subnets) : []
  sg_list     = var.security_group != "" ? [var.security_group] : []
  cluster_ref = var.cluster_arn != "" ? var.cluster_arn : "default"
}
