From eab358aa44ac7e2310a89829f038dca242872325 Mon Sep 17 00:00:00 2001 From: patoarvizu Date: Thu, 8 Mar 2018 13:25:41 -0500 Subject: [PATCH 1/3] Use variable cluster_name as a name prefix for the autoscaling group --- modules/vault-cluster/main.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/vault-cluster/main.tf b/modules/vault-cluster/main.tf index 9d82452d..9600dae1 100644 --- a/modules/vault-cluster/main.tf +++ b/modules/vault-cluster/main.tf @@ -11,6 +11,8 @@ terraform { # --------------------------------------------------------------------------------------------------------------------- resource "aws_autoscaling_group" "autoscaling_group" { + name_prefix = "${var.cluster_name}" + launch_configuration = "${aws_launch_configuration.launch_configuration.name}" availability_zones = ["${var.availability_zones}"] From 4adffff0b2f1e03d774b496530b56d2d6ed92f93 Mon Sep 17 00:00:00 2001 From: patoarvizu Date: Thu, 8 Mar 2018 13:50:56 -0500 Subject: [PATCH 2/3] Use consul-cluster module version 0.2.0 which introduced the same ASG namespacing fix --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index a40adf7b..374af95c 100644 --- a/main.tf +++ b/main.tf @@ -154,7 +154,7 @@ data "aws_route53_zone" "selected" { # --------------------------------------------------------------------------------------------------------------------- module "consul_cluster" { - source = "github.com/hashicorp/terraform-aws-consul//modules/consul-cluster?ref=v0.0.2" + source = "github.com/hashicorp/terraform-aws-consul//modules/consul-cluster?ref=v0.2.0" cluster_name = "${var.consul_cluster_name}" cluster_size = "${var.consul_cluster_size}" From 721d1694a8213861c83a928f6478879e826f845d Mon Sep 17 00:00:00 2001 From: patoarvizu Date: Fri, 9 Mar 2018 14:39:06 -0500 Subject: [PATCH 3/3] Update remaining references of terraform-aws-consul to point to version 0.2.0 --- examples/vault-cluster-private/main.tf | 4 ++-- examples/vault-s3-backend/main.tf | 4 ++-- main.tf | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/vault-cluster-private/main.tf b/examples/vault-cluster-private/main.tf index fae93f0d..ca93c09c 100644 --- a/examples/vault-cluster-private/main.tf +++ b/examples/vault-cluster-private/main.tf @@ -48,7 +48,7 @@ module "vault_cluster" { # --------------------------------------------------------------------------------------------------------------------- module "consul_iam_policies_servers" { - source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.1.0" + source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.2.0" iam_role_id = "${module.vault_cluster.iam_role_id}" } @@ -73,7 +73,7 @@ data "template_file" "user_data_vault_cluster" { # --------------------------------------------------------------------------------------------------------------------- module "consul_cluster" { - source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.1.0" + source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.2.0" cluster_name = "${var.consul_cluster_name}" cluster_size = "${var.consul_cluster_size}" diff --git a/examples/vault-s3-backend/main.tf b/examples/vault-s3-backend/main.tf index b1d1c635..456ca249 100644 --- a/examples/vault-s3-backend/main.tf +++ b/examples/vault-s3-backend/main.tf @@ -52,7 +52,7 @@ module "vault_cluster" { # --------------------------------------------------------------------------------------------------------------------- module "consul_iam_policies_servers" { - source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.1.0" + source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-iam-policies?ref=v0.2.0" iam_role_id = "${module.vault_cluster.iam_role_id}" } @@ -78,7 +78,7 @@ data "template_file" "user_data_vault_cluster" { # --------------------------------------------------------------------------------------------------------------------- module "consul_cluster" { - source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.1.0" + source = "github.com/hashicorp/terraform-aws-consul.git//modules/consul-cluster?ref=v0.2.0" cluster_name = "${var.consul_cluster_name}" cluster_size = "${var.consul_cluster_size}" diff --git a/main.tf b/main.tf index 374af95c..61273211 100644 --- a/main.tf +++ b/main.tf @@ -94,7 +94,7 @@ module "vault_cluster" { # --------------------------------------------------------------------------------------------------------------------- module "consul_iam_policies_servers" { - source = "github.com/hashicorp/terraform-aws-consul//modules/consul-iam-policies?ref=v0.0.2" + source = "github.com/hashicorp/terraform-aws-consul//modules/consul-iam-policies?ref=v0.2.0" iam_role_id = "${module.vault_cluster.iam_role_id}" }