Skip to content

Commit 0368f07

Browse files
add iam role arn output (#105)
Co-authored-by: cloudpossebot <[email protected]>
1 parent f5c4e19 commit 0368f07

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ Available targets:
340340
| <a name="output_public_dns"></a> [public\_dns](#output\_public\_dns) | Public DNS of instance (or DNS of EIP) |
341341
| <a name="output_public_ip"></a> [public\_ip](#output\_public\_ip) | Public IP of instance (or EIP) |
342342
| <a name="output_role"></a> [role](#output\_role) | Name of AWS IAM Role associated with the instance |
343+
| <a name="output_role_arn"></a> [role\_arn](#output\_role\_arn) | ARN of AWS IAM Role associated with the instance |
343344
| <a name="output_security_group_arn"></a> [security\_group\_arn](#output\_security\_group\_arn) | EC2 instance Security Group ARN |
344345
| <a name="output_security_group_id"></a> [security\_group\_id](#output\_security\_group\_id) | EC2 instance Security Group ID |
345346
| <a name="output_security_group_ids"></a> [security\_group\_ids](#output\_security\_group\_ids) | IDs on the AWS Security Groups associated with the instance |

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
| <a name="output_public_dns"></a> [public\_dns](#output\_public\_dns) | Public DNS of instance (or DNS of EIP) |
144144
| <a name="output_public_ip"></a> [public\_ip](#output\_public\_ip) | Public IP of instance (or EIP) |
145145
| <a name="output_role"></a> [role](#output\_role) | Name of AWS IAM Role associated with the instance |
146+
| <a name="output_role_arn"></a> [role\_arn](#output\_role\_arn) | ARN of AWS IAM Role associated with the instance |
146147
| <a name="output_security_group_arn"></a> [security\_group\_arn](#output\_security\_group\_arn) | EC2 instance Security Group ARN |
147148
| <a name="output_security_group_id"></a> [security\_group\_id](#output\_security\_group\_id) | EC2 instance Security Group ID |
148149
| <a name="output_security_group_ids"></a> [security\_group\_ids](#output\_security\_group\_ids) | IDs on the AWS Security Groups associated with the instance |

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ output "role" {
5353
value = local.instance_profile_count > 0 ? join("", aws_iam_role.default.*.name) : join("", data.aws_iam_instance_profile.given.*.role_name)
5454
}
5555

56+
output "role_arn" {
57+
description = "ARN of AWS IAM Role associated with the instance"
58+
value = local.instance_profile_count > 0 ? join("", aws_iam_role.default.*.arn) : join("", data.aws_iam_instance_profile.given.*.role_arn)
59+
}
60+
5661
output "alarm" {
5762
description = "CloudWatch Alarm ID"
5863
value = join("", aws_cloudwatch_metric_alarm.default.*.id)

0 commit comments

Comments
 (0)