forked from sassoftware/viya4-iac-azure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
150 lines (120 loc) · 3.83 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Copyright © 2020-2024, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# aks
output "aks_host" {
value = module.aks.host
sensitive = true
}
output "nat_ip" {
value = var.egress_public_ip_name == null ? module.aks.cluster_public_ip : data.azurerm_public_ip.nat-ip[0].ip_address
}
output "kube_config" {
value = module.kubeconfig.kube_config
sensitive = true
}
output "aks_cluster_node_username" {
value = module.aks.cluster_username
sensitive = true
}
output "aks_cluster_password" {
value = module.aks.cluster_password
sensitive = true
}
output "aks_pod_cidr" {
value = var.aks_pod_cidr
}
# postgres
output "postgres_servers" {
value = length(module.flex_postgresql) != 0 ? local.postgres_outputs : null
sensitive = true
}
# jump server
output "jump_private_ip" {
value = var.create_jump_vm ? module.jump[0].private_ip_address : null
}
output "jump_public_ip" {
value = var.create_jump_vm && var.create_jump_public_ip ? module.jump[0].public_ip_address : null
}
output "jump_admin_username" {
value = var.create_jump_vm ? module.jump[0].admin_username : null
}
output "jump_rwx_filestore_path" {
value = var.create_jump_vm ? var.jump_rwx_filestore_path : null
}
# nfs server
output "nfs_private_ip" {
value = var.storage_type == "standard" ? module.nfs[0].private_ip_address : null
}
output "nfs_public_ip" {
value = var.storage_type == "standard" && var.create_nfs_public_ip ? module.nfs[0].public_ip_address : null
}
output "nfs_admin_username" {
value = var.storage_type == "standard" ? module.nfs[0].admin_username : null
}
# acr
output "cr_name" {
value = var.create_container_registry ? element(coalescelist(azurerm_container_registry.acr[*].name, [" "]), 0) : null
}
output "cr_id" {
value = var.create_container_registry ? element(coalescelist(azurerm_container_registry.acr[*].id, [" "]), 0) : null
}
output "cr_endpoint" {
value = var.create_container_registry ? element(coalescelist(azurerm_container_registry.acr[*].login_server, [" "]), 0) : null
}
output "cr_admin_user" {
value = (var.create_container_registry && var.container_registry_admin_enabled) ? element(coalescelist(azurerm_container_registry.acr[*].admin_username, [" "]), 0) : null
}
output "cr_admin_password" {
value = (var.create_container_registry && var.container_registry_admin_enabled) ? element(coalescelist(azurerm_container_registry.acr[*].admin_password, [" "]), 0) : null
sensitive = true
}
output "location" {
value = var.location
}
output "prefix" {
value = var.prefix
}
output "cluster_name" {
value = module.aks.name
}
output "provider_account" {
value = data.azurerm_subscription.current.display_name
}
output "provider" {
value = "azure"
}
output "rwx_filestore_endpoint" {
value = (var.storage_type == "none"
? null
: var.storage_type == "ha" ? module.netapp[0].netapp_endpoint : module.nfs[0].private_ip_address
)
}
output "rwx_filestore_path" {
value = (var.storage_type == "none"
? null
: var.storage_type == "ha" ? module.netapp[0].netapp_path : "/export"
)
}
output "rwx_filestore_config" {
value = var.storage_type == "ha" ? jsonencode({
"version" : 1,
"storageDriverName" : "azure-netapp-files",
"subscriptionID" : split("/", data.azurerm_subscription.current.id)[2],
"tenantID" : data.azurerm_subscription.current.tenant_id,
"clientID" : var.client_id,
"clientSecret" : var.client_secret,
"location" : local.aks_rg.location,
"serviceLevel" : var.netapp_service_level,
"virtualNetwork" : module.vnet.name,
"subnet" : module.vnet.subnets["netapp"],
"defaults" : {
"exportRule" : element(tolist(module.vnet.address_space), 0),
}
}) : null
}
output "cluster_node_pool_mode" {
value = var.cluster_node_pool_mode
}
output "cluster_api_mode" {
value = var.cluster_api_mode
}