Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Export role names from the AWS account module #170

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RELEASE_TYPE: minor

In `iam/prebuilt/account/aws`, export the IAM role names as well as the ARNs.

Additionally, if you want to get all the role ARNs or names, you can use `all_role_arns` or `all_role_names`.
46 changes: 46 additions & 0 deletions iam/prebuilt/account/aws/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,49 @@ output "read_only_role_arn" {
output "publisher_role_arn" {
value = "${module.publisher_role.arn}"
}

output "all_role_arns" {
value = [
"${module.admin_role.arn}",
"${module.billing_role.arn}",
"${module.developer_role.arn}",
"${module.monitoring_role.arn}",
"${module.read_only_role.arn}",
"${module.publisher_role.arn}",
]
}

output "admin_role_name" {
value = "${module.admin_role.name}"
}

output "billing_role_name" {
value = "${module.billing_role.name}"
}

output "developer_role_name" {
value = "${module.developer_role.name}"
}

output "monitoring_role_name" {
value = "${module.monitoring_role.name}"
}

output "read_only_role_name" {
value = "${module.read_only_role.name}"
}

output "publisher_role_name" {
value = "${module.publisher_role.name}"
}

output "all_role_names" {
value = [
"${module.admin_role.name}",
"${module.billing_role.name}",
"${module.developer_role.name}",
"${module.monitoring_role.name}",
"${module.read_only_role.name}",
"${module.publisher_role.name}",
]
}