From 59ced5fdb408f59a99c57e58f38d10335abb8db4 Mon Sep 17 00:00:00 2001 From: jimbecker Date: Wed, 27 Jun 2018 11:23:19 -0400 Subject: [PATCH 1/4] fixed specifying cluster and worker security group --- local.tf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/local.tf b/local.tf index 6c3249d..58a59cb 100644 --- a/local.tf +++ b/local.tf @@ -1,7 +1,9 @@ locals { asg_tags = ["${null_resource.tags_as_list_of_maps.*.triggers}"] - cluster_security_group_id = "${var.cluster_security_group_id == "" ? aws_security_group.cluster.id : var.cluster_security_group_id}" - worker_security_group_id = "${var.worker_security_group_id == "" ? aws_security_group.workers.id : var.worker_security_group_id}" + + # Followed recommendation http://67bricks.com/blog/?p=85 to workaround terraform not supporting short circut evaluation + cluster_security_group_id = "${coalesce(join("", aws_security_group.cluster.*.id), var.cluster_security_group_id)}" + worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.cluster_security_group_id)}" workstation_external_cidr = "${chomp(data.http.workstation_external_ip.body)}/32" # Mapping from the node type that we selected and the max number of pods that it can run From 5902fe0fbc662e3af5846f7b5956cd8265c586d3 Mon Sep 17 00:00:00 2001 From: jimbecker Date: Wed, 27 Jun 2018 11:57:19 -0400 Subject: [PATCH 2/4] fixed formatting error --- local.tf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/local.tf b/local.tf index 58a59cb..ef71665 100644 --- a/local.tf +++ b/local.tf @@ -1,8 +1,10 @@ locals { - asg_tags = ["${null_resource.tags_as_list_of_maps.*.triggers}"] + asg_tags = ["${null_resource.tags_as_list_of_maps.*.triggers}"] - # Followed recommendation http://67bricks.com/blog/?p=85 to workaround terraform not supporting short circut evaluation + # Followed recommendation http://67bricks.com/blog/?p=85 + # to workaround terraform not supporting short circut evaluation cluster_security_group_id = "${coalesce(join("", aws_security_group.cluster.*.id), var.cluster_security_group_id)}" + worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.cluster_security_group_id)}" workstation_external_cidr = "${chomp(data.http.workstation_external_ip.body)}/32" From 3d50463cfe4e5d48c9a960c21b45c1aeed5e35d2 Mon Sep 17 00:00:00 2001 From: jimbecker Date: Wed, 27 Jun 2018 12:49:50 -0400 Subject: [PATCH 3/4] fixed incorrect variable reference --- local.tf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/local.tf b/local.tf index ef71665..999a987 100644 --- a/local.tf +++ b/local.tf @@ -4,8 +4,7 @@ locals { # Followed recommendation http://67bricks.com/blog/?p=85 # to workaround terraform not supporting short circut evaluation cluster_security_group_id = "${coalesce(join("", aws_security_group.cluster.*.id), var.cluster_security_group_id)}" - - worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.cluster_security_group_id)}" + worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.worker_security_group_id)}" workstation_external_cidr = "${chomp(data.http.workstation_external_ip.body)}/32" # Mapping from the node type that we selected and the max number of pods that it can run From 776192f90d5cf1996ee700e552694a91eaf224f8 Mon Sep 17 00:00:00 2001 From: jimbecker Date: Wed, 27 Jun 2018 13:32:43 -0400 Subject: [PATCH 4/4] fixed formatting issue... --- local.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/local.tf b/local.tf index 999a987..2942758 100644 --- a/local.tf +++ b/local.tf @@ -4,6 +4,7 @@ locals { # Followed recommendation http://67bricks.com/blog/?p=85 # to workaround terraform not supporting short circut evaluation cluster_security_group_id = "${coalesce(join("", aws_security_group.cluster.*.id), var.cluster_security_group_id)}" + worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.worker_security_group_id)}" workstation_external_cidr = "${chomp(data.http.workstation_external_ip.body)}/32"