From 7045c078a3420aafa7184455b24a334ec40140a2 Mon Sep 17 00:00:00 2001 From: Vincent Caggiari Date: Tue, 11 Oct 2016 17:47:54 +0200 Subject: [PATCH 1/4] added outputs --- iam-role/main.tf | 4 ++++ main.tf | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/iam-role/main.tf b/iam-role/main.tf index d06ff2d8..f5bd37c9 100644 --- a/iam-role/main.tf +++ b/iam-role/main.tf @@ -100,6 +100,10 @@ resource "aws_iam_instance_profile" "default_ecs" { roles = ["${aws_iam_role.default_ecs_role.name}"] } +output "default_ecs_role_id" { + value = "${aws_iam_role.default_ecs_role.id}" +} + output "arn" { value = "${aws_iam_role.default_ecs_role.arn}" } diff --git a/main.tf b/main.tf index 0ec714f8..266f28fc 100644 --- a/main.tf +++ b/main.tf @@ -129,6 +129,16 @@ variable "ecs_ami" { default = "" } +variable "extra_cloud_config_type" { + description = "Extra cloud config type" + default = "text/cloud-config" +} + +variable "extra_cloud_config_content" { + description = "Extra cloud config content" + default = "" +} + module "defaults" { source = "./defaults" region = "${var.region}" @@ -204,6 +214,8 @@ module "ecs_cluster" { docker_auth_type = "${var.ecs_docker_auth_type}" docker_auth_data = "${var.ecs_docker_auth_data}" security_groups = "${coalesce(var.ecs_security_groups, format("%s,%s,%s", module.security_groups.internal_ssh, module.security_groups.internal_elb, module.security_groups.external_elb))}" + extra_cloud_config_type = "${var.extra_cloud_config_type}" + extra_cloud_config_content = "${var.extra_cloud_config_content}" } module "s3_logs" { @@ -253,6 +265,10 @@ output "iam_role" { value = "${module.iam_role.arn}" } +output "iam_role_default_ecs_role_id" { + value = "${module.iam_role.default_ecs_role_id}" +} + // S3 bucket ID for ELB logs. output "log_bucket_id" { value = "${module.s3_logs.id}" From 28d022b72a0a050b5303f44573c21681715b550b Mon Sep 17 00:00:00 2001 From: Vincent Caggiari Date: Tue, 11 Oct 2016 17:53:17 +0200 Subject: [PATCH 2/4] added comment --- main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/main.tf b/main.tf index 266f28fc..09e489f2 100644 --- a/main.tf +++ b/main.tf @@ -265,6 +265,7 @@ output "iam_role" { value = "${module.iam_role.arn}" } +// ECS Default ECS role ID. Useful if you want to add a new policy to that role. output "iam_role_default_ecs_role_id" { value = "${module.iam_role.default_ecs_role_id}" } From 967feaec73f8246df1201378b2781d1f8b91d6a5 Mon Sep 17 00:00:00 2001 From: Vincent Caggiari Date: Wed, 12 Oct 2016 01:51:02 +0200 Subject: [PATCH 3/4] clean before pull request, this branch had code from another unrelated branch... --- main.tf | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/main.tf b/main.tf index 09e489f2..d9ea9d1d 100644 --- a/main.tf +++ b/main.tf @@ -129,16 +129,6 @@ variable "ecs_ami" { default = "" } -variable "extra_cloud_config_type" { - description = "Extra cloud config type" - default = "text/cloud-config" -} - -variable "extra_cloud_config_content" { - description = "Extra cloud config content" - default = "" -} - module "defaults" { source = "./defaults" region = "${var.region}" @@ -214,8 +204,6 @@ module "ecs_cluster" { docker_auth_type = "${var.ecs_docker_auth_type}" docker_auth_data = "${var.ecs_docker_auth_data}" security_groups = "${coalesce(var.ecs_security_groups, format("%s,%s,%s", module.security_groups.internal_ssh, module.security_groups.internal_elb, module.security_groups.external_elb))}" - extra_cloud_config_type = "${var.extra_cloud_config_type}" - extra_cloud_config_content = "${var.extra_cloud_config_content}" } module "s3_logs" { From 9d3c5b1bfcba546b78955c8203d54f14b448b513 Mon Sep 17 00:00:00 2001 From: Vincent Caggiari Date: Wed, 12 Oct 2016 01:52:47 +0200 Subject: [PATCH 4/4] mistyping --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index d9ea9d1d..ddf743b6 100644 --- a/main.tf +++ b/main.tf @@ -253,7 +253,7 @@ output "iam_role" { value = "${module.iam_role.arn}" } -// ECS Default ECS role ID. Useful if you want to add a new policy to that role. +// Default ECS role ID. Useful if you want to add a new policy to that role. output "iam_role_default_ecs_role_id" { value = "${module.iam_role.default_ecs_role_id}" }