-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutputs.tf
22 lines (20 loc) · 1.03 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
output "public_address" {
description = "Public address for GraphDB"
value = var.gateway_enable_private_access ? null : (
var.disable_agw ? (
# If disable_agw is true, use graphdb_external_address_fqdn with context_path if set
"https://${coalesce(var.graphdb_external_address_fqdn, "")}${length(var.context_path) > 0 ? "/${trim(var.context_path, "/")}" : ""}/"
) : (
# If disable_agw is false, check context_path
length(var.context_path) > 0 ?
# If context_path has content, use application_gateway with context_path
"https://${module.application_gateway[0].public_ip_address_fqdn}/${trim(var.context_path, "/")}/" :
# If context_path is empty, use application_gateway without path
"https://${module.application_gateway[0].public_ip_address_fqdn}/"
)
)
}
output "private_ip_address" {
description = "The Private IPv4 address for accessing GraphDB via the Application Gateway"
value = var.gateway_enable_private_access ? module.application_gateway[0].private_ip_address : null
}