Skip to content

Commit 2db82c0

Browse files
+ iam role export
1 parent 1ac185b commit 2db82c0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

modules/iam/outputs.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
output "ecs_instance_profile" {
2-
description = "aws_iam_role_autodiscovery_role exports the IAM role of the EC2 instance"
2+
description = "ecs_instance_profile exports the instance profile of the EC2 instance"
33
value = "${element(concat(aws_iam_instance_profile.ecs_cluster_ec2_instance_profile.*.arn, list("")), 0)}"
44
}
5+
6+
output "ecs_instance_role" {
7+
description = "ecs_instance_role exports the IAM role of the EC2 instance"
8+
value = "${element(concat(aws_iam_role.ecs_cluster_ec2_instance_role.*.id, list("")), 0)}"
9+
}

outputs.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ output "ecs_cluster_name" {
99
}
1010

1111
output "ecs_instance_profile" {
12-
description = "aws_iam_role_autodiscovery_role exports the IAM role of the EC2 instance"
12+
description = "aws_iam_role_autodiscovery_role exports the instance profile of the EC2 instance"
1313
value = "${module.iam.ecs_instance_profile}"
1414
}
15+
16+
output "ecs_instance_role" {
17+
description = "ecs_instance_role exports the IAM role of the EC2 instance"
18+
value = "${module.iam.ecs_instance_role}"
19+
}

0 commit comments

Comments
 (0)