From 3b822f43c274b7da4d4f2e86e93e1dc6215054f4 Mon Sep 17 00:00:00 2001 From: Jakub Scholz Date: Sat, 27 Jul 2019 23:51:05 +0200 Subject: [PATCH] Fix Terraform 0.12 update --- main.tf | 6 +++--- variables.tf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index f426aa2..e775c74 100644 --- a/main.tf +++ b/main.tf @@ -389,8 +389,8 @@ resource "aws_autoscaling_group" "nodes" { desired_capacity = var.min_worker_count launch_configuration = aws_launch_configuration.nodes.name - tags = merge( - { + tags = concat( + [{ key = "kubernetes.io/cluster/${var.cluster_name}" value = "owned" propagate_at_launch = true @@ -399,7 +399,7 @@ resource "aws_autoscaling_group" "nodes" { key = "Name" value = "${var.cluster_name}-node" propagate_at_launch = true - }, + }], var.tags2, ) diff --git a/variables.tf b/variables.tf index 0cc3a26..fe19b45 100644 --- a/variables.tf +++ b/variables.tf @@ -14,7 +14,7 @@ variable "tags" { variable "tags2" { description = "Tags in format used for the AWS Autoscaling Group" - type = list(string) + type = list(object({key = string, value = string, propagate_at_launch = bool})) } variable "addons" {