generated from blackbird-cloud/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
35 lines (30 loc) · 1.15 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
output "account_id" {
value = data.aws_caller_identity.default.account_id
description = "The account's account id."
}
output "partition" {
value = data.aws_partition.default.id
description = "The account's partition."
}
output "region" {
value = data.aws_region.default.name
description = "The current region."
}
output "organization" {
value = data.aws_organizations_organization.default
description = "The account's organization."
}
output "organizational_units" {
value = try(data.aws_organizations_organizational_units.default[0], null)
description = "The account's organizational units. Is empty on non management-account."
}
output "sso_roles" {
value = {
for permissionset, role in data.aws_iam_roles.roles : permissionset => {
arn : [for arn in role.arns : arn][0],
name : [for name in role.names : name][0],
arn_no_path : "arn:aws:iam::${data.aws_caller_identity.default.account_id}:role/${[for name in role.names : name][0]}"
}
}
description = "The roles created by the IAM Identity Center, configure the variable `aws_sso_permission_sets` when you want to retrieve these."
}