-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
89 lines (76 loc) · 1.87 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
output "managed_policies" {
description = "Map of attributes of managed policies created."
value = {
for key, value in aws_iam_policy.this :
key => {
arn = value.arn
name = value.name
policy_id = value.policy_id
}
}
}
output "roles" {
description = "Map of attributes of roles created."
value = {
for k, v in aws_iam_role.this :
k => {
name = v.name
arn = v.arn
inline_policies = [
for key, value in aws_iam_role_policy.this :
value.name if v.name == value.role
]
managed_policies = [
for key, value in aws_iam_role_policy_attachment.this :
value.policy_arn if v.name == value.role
]
}
}
}
output "users" {
description = "Map of attributes of users created."
value = {
for k, v in aws_iam_user.this :
k => {
name = v.name
arn = v.arn
inline_policies = [
for key, value in aws_iam_user_policy.this :
value.name if v.name == value.user
]
managed_policies = [
for key, value in aws_iam_user_policy_attachment.this :
value.policy_arn if v.name == value.user
]
}
}
}
output "groups" {
description = "Map of attributes of groups created."
value = {
for k, v in aws_iam_group.this :
k => {
name = v.name
arn = v.arn
inline_policies = [
for key, value in aws_iam_group_policy.this :
value.name if v.name == value.group
]
managed_policies = [
for key, value in aws_iam_group_policy_attachment.this :
value.policy_arn if v.name == value.group
]
}
}
}
output "user_access_keys" {
description = "Map of Access Key IDs and Secret Access Keys of users created."
sensitive = true
value = {
for k, v in aws_iam_access_key.this :
k => {
id = v.id
secret = v.secret
}
}
}