diff --git a/examples/iam-assumable-role/README.md b/examples/iam-assumable-role/README.md
index 2f73d8d3..11e00001 100644
--- a/examples/iam-assumable-role/README.md
+++ b/examples/iam-assumable-role/README.md
@@ -49,6 +49,7 @@ No inputs.
| Name | Description |
|------|-------------|
+| [iam\_instance\_profile\_id](#output\_iam\_instance\_profile\_id) | IAM Instance profile's ID. |
| [iam\_role\_arn](#output\_iam\_role\_arn) | ARN of IAM role |
| [iam\_role\_name](#output\_iam\_role\_name) | Name of IAM role |
| [iam\_role\_path](#output\_iam\_role\_path) | Path of IAM role |
diff --git a/examples/iam-assumable-role/main.tf b/examples/iam-assumable-role/main.tf
index ad00261b..017896c8 100644
--- a/examples/iam-assumable-role/main.tf
+++ b/examples/iam-assumable-role/main.tf
@@ -17,7 +17,8 @@ module "iam_assumable_role_admin" {
"codedeploy.amazonaws.com"
]
- create_role = true
+ create_role = true
+ create_instance_profile = true
role_name = "admin"
role_requires_mfa = true
diff --git a/examples/iam-assumable-role/outputs.tf b/examples/iam-assumable-role/outputs.tf
index 1c7591e1..93b6d139 100644
--- a/examples/iam-assumable-role/outputs.tf
+++ b/examples/iam-assumable-role/outputs.tf
@@ -22,3 +22,8 @@ output "role_requires_mfa" {
description = "Whether admin IAM role requires MFA"
value = module.iam_assumable_role_admin.role_requires_mfa
}
+
+output "iam_instance_profile_id" {
+ description = "IAM Instance profile's ID."
+ value = module.iam_assumable_role_admin.iam_instance_profile_id
+}
diff --git a/modules/iam-assumable-role/README.md b/modules/iam-assumable-role/README.md
index 6020bef7..83254878 100644
--- a/modules/iam-assumable-role/README.md
+++ b/modules/iam-assumable-role/README.md
@@ -68,6 +68,7 @@ No modules.
| Name | Description |
|------|-------------|
| [iam\_instance\_profile\_arn](#output\_iam\_instance\_profile\_arn) | ARN of IAM instance profile |
+| [iam\_instance\_profile\_id](#output\_iam\_instance\_profile\_id) | IAM Instance profile's ID. |
| [iam\_instance\_profile\_name](#output\_iam\_instance\_profile\_name) | Name of IAM instance profile |
| [iam\_instance\_profile\_path](#output\_iam\_instance\_profile\_path) | Path of IAM instance profile |
| [iam\_role\_arn](#output\_iam\_role\_arn) | ARN of IAM role |
diff --git a/modules/iam-assumable-role/outputs.tf b/modules/iam-assumable-role/outputs.tf
index 1d902188..a8d1c563 100644
--- a/modules/iam-assumable-role/outputs.tf
+++ b/modules/iam-assumable-role/outputs.tf
@@ -33,6 +33,11 @@ output "iam_instance_profile_name" {
value = element(concat(aws_iam_instance_profile.this.*.name, [""]), 0)
}
+output "iam_instance_profile_id" {
+ description = "IAM Instance profile's ID."
+ value = element(concat(aws_iam_instance_profile.this.*.id, [""]), 0)
+}
+
output "iam_instance_profile_path" {
description = "Path of IAM instance profile"
value = element(concat(aws_iam_instance_profile.this.*.path, [""]), 0)