-
Notifications
You must be signed in to change notification settings - Fork 2
/
outputs.tf
42 lines (40 loc) · 1.41 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
# Outputs
# -------
output "summary" {
value = {
resource_group = {
name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
}
container_registry = {
id = azurerm_container_registry.cr.id
name = azurerm_container_registry.cr.name
admin_enabled = azurerm_container_registry.cr.admin_enabled
login_server = azurerm_container_registry.cr.login_server
}
key_vault = {
id = azurerm_key_vault.kv.id
name = azurerm_key_vault.kv.name
vault_uri = azurerm_key_vault.kv.vault_uri
enable_rbac_authorization = azurerm_key_vault.kv.enable_rbac_authorization
}
}
}
output "acr_role_assginments" {
value = [
for k, v in zipmap( # needed to combine resource and data sources
keys(azurerm_role_assignment.acr_assignments),
values(azurerm_role_assignment.acr_assignments)) :
{
tostring(k) = {
id = v.id
scope = v.scope
role_definition_name = v.role_definition_name
principal_id = v.principal_id
principal_type = v.principal_type
principal_name = data.azurerm_user_assigned_identity.acr_principals[k].name
principal_rg = data.azurerm_user_assigned_identity.acr_principals[k].resource_group_name
}
}
]
}