Skip to content

Commit a86c5f4

Browse files
committed
Azure customer managed resources: added TF output
1 parent 2865198 commit a86c5f4

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
output "resource_groups" {
2+
description = "Resource groups"
3+
value = {
4+
"redpanda" : {
5+
"name" : azurerm_resource_group.redpanda.name,
6+
"id" : azurerm_resource_group.redpanda.id
7+
},
8+
"storage" : {
9+
"name" : azurerm_resource_group.storage.name,
10+
"id" : azurerm_resource_group.storage.id
11+
},
12+
"network" : {
13+
"name" : azurerm_resource_group.network.name,
14+
"id" : azurerm_resource_group.network.id
15+
},
16+
"iam" : {
17+
"name" : azurerm_resource_group.iam.name,
18+
"id" : azurerm_resource_group.iam.id
19+
}
20+
}
21+
}
22+
23+
output "roles" {
24+
description = "IAM roles"
25+
value = {
26+
"agent" : azurerm_role_definition.redpanda_agent.id,
27+
"console" : azurerm_role_definition.redpanda_console.id,
28+
"private-link" : azurerm_role_definition.redpanda_private_link.id
29+
}
30+
}
31+
32+
output "identities" {
33+
description = "User assigned identities"
34+
value = {
35+
"agent" : azurerm_user_assigned_identity.redpanda_agent.id,
36+
"cert-manager" : azurerm_user_assigned_identity.cert_manager.id,
37+
"external-dns" : azurerm_user_assigned_identity.external_dns.id,
38+
"aks" : azurerm_user_assigned_identity.aks.id,
39+
"redpanda-cluster" : azurerm_user_assigned_identity.redpanda_cluster.id,
40+
"redpanda-console" : azurerm_user_assigned_identity.redpanda_console.id
41+
}
42+
}
43+
44+
output "networks" {
45+
description = "Networks"
46+
value = {
47+
"vnet" : {
48+
"name" : azurerm_virtual_network.redpanda.name,
49+
"resource_group" : azurerm_virtual_network.redpanda.resource_group_name,
50+
"address_space" : join(",", azurerm_virtual_network.redpanda.address_space)
51+
},
52+
"private-subnets" : {
53+
for k, v in azurerm_subnet.private : k => {
54+
"id" : v.id,
55+
"address_prefixes" : join(",", v.address_prefixes)
56+
}
57+
},
58+
"egress-subnets" : {
59+
for k, v in azurerm_subnet.public : k => {
60+
"id" : v.id,
61+
"address_prefixes" : join(",", v.address_prefixes)
62+
}
63+
}
64+
"subnet-cidrs-aks" : var.reserved_subnet_cidrs
65+
}
66+
}
67+
68+
output "security" {
69+
description = "Security groups"
70+
value = {
71+
"redpanda-cluster" : azurerm_network_security_group.redpanda_cluster.id
72+
}
73+
}
74+
75+
output "storage" {
76+
description = "Storage"
77+
value = {
78+
"management" : {
79+
"storage-account-id" : azurerm_storage_account.management.id,
80+
"bucket" : azurerm_storage_container.management.id
81+
},
82+
"tiered" : {
83+
"storage-account-id" : azurerm_storage_account.tiered_storage.id,
84+
"bucket" : azurerm_storage_container.tiered_storage.id
85+
}
86+
}
87+
}
88+
89+
output "vault" {
90+
description = "Key vault"
91+
value = {
92+
"redpanda-cluster" : var.redpanda_console_key_vault_name != "" ? azurerm_key_vault.vault[0].id : ""
93+
"redpanda-console" : var.redpanda_console_key_vault_name != "" ? azurerm_key_vault.console[0].id : ""
94+
}
95+
}

0 commit comments

Comments
 (0)