-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.hbs
41 lines (38 loc) · 1.25 KB
/
outputs.hbs
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
{{> header_generated}}
{{! Output account ids. }}
###############################################################################
# Accounts
###############################################################################
output "accounts" {
value = { {{#each accounts}}{{#unless this.action}}
{{@key}} = {
id = aws_organizations_account.{{@key}}.id
} {{/unless}}{{/each}}
}
}
{{! Output organizational unit ids. }}
###############################################################################
# Organizational Units
###############################################################################
output "organizational_units" {
value = { {{#each organizational_units}}{{#unless this.action}}
{{@key}} = {
id = aws_organizations_organizational_unit.{{@key}}.id
} {{/unless}}{{/each}}
}
}
{{! If SSO users exist, output their ids. }}
{{#if (lodash "size" sso.users)}}
###############################################################################
# SSO
###############################################################################
output "sso" {
value = {
users = { {{#each sso.users}}{{#unless this.action}}
{{@key}} = {
id = aws_identitystore_user.{{@key}}.id
} {{/unless}}{{/each}}
}
}
}
{{/if}}