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..ddf743b6 100644 --- a/main.tf +++ b/main.tf @@ -253,6 +253,11 @@ output "iam_role" { value = "${module.iam_role.arn}" } +// 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}" +} + // S3 bucket ID for ELB logs. output "log_bucket_id" { value = "${module.s3_logs.id}"