From 5358f0ea1449270b22faa3288ec96c0f6f072cd3 Mon Sep 17 00:00:00 2001 From: Shingo Omura Date: Thu, 26 May 2016 19:07:04 +0900 Subject: [PATCH] Added necessary prefixes to resources in autoscaling/hooks/enabled so that multiple concourse clusters can be provisioned in the same aws account. We need to put prefix to names of iam_role and sqs becase they exist independently to target auto scaling group. --- autoscaling/hooks/enabled/main.tf | 8 ++++++-- main.tf | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/autoscaling/hooks/enabled/main.tf b/autoscaling/hooks/enabled/main.tf index 9693719..51fa1d0 100644 --- a/autoscaling/hooks/enabled/main.tf +++ b/autoscaling/hooks/enabled/main.tf @@ -2,11 +2,11 @@ # https://dzone.com/articles/graceful-shutdown-using-aws-autoscaling-groups-and resource "aws_sqs_queue" "graceful_termination_queue" { - name = "graceful_termination_queue" + name = "${var.prefix}graceful_termination_queue" } resource "aws_iam_role" "autoscaling_role" { - name = "autoscaling_role" +name = "${var.prefix}autoscaling_role" assume_role_policy = <