From d26bee17e8799896576ac32375a485a45ee4cbf9 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Wed, 30 Oct 2019 09:42:47 +0000 Subject: [PATCH] Export role names from the AWS account module --- RELEASE.md | 5 ++++ iam/prebuilt/account/aws/outputs.tf | 46 +++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..03e8a28 --- /dev/null +++ b/RELEASE.md @@ -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`. \ No newline at end of file diff --git a/iam/prebuilt/account/aws/outputs.tf b/iam/prebuilt/account/aws/outputs.tf index f4c2478..41953b9 100644 --- a/iam/prebuilt/account/aws/outputs.tf +++ b/iam/prebuilt/account/aws/outputs.tf @@ -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}", + ] +}