Skip to content

Commit

Permalink
Split endpoint information into parts.
Browse files Browse the repository at this point in the history
  • Loading branch information
zawac002 committed Sep 15, 2023
1 parent ab52703 commit 84f9938
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 3 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
locals {
gateway_internal = {
hostname = format("loki-gateway.%v.svc.cluster.local", local.ns)
port_number = "80"
url = format("http://loki-gateway.%v.svc.cluster.local", local.ns)
}
gateway_internal_hostname = format("loki-gateway.%v.svc.cluster.local", local.ns)
gateway_internal_port_number = "80"
gateway_internal_url = format("http://%v:%v/", local.gateway_internal_hostname, local.gateway_internal_port_number)
}

resource "kubernetes_namespace" "ns" {
Expand Down
6 changes: 5 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

output "gateway_internal_endpoint" {
description = "The endpoint which can be used inside of the cluster to access loki-gateway."
value = local.gateway_internal
value = {
hostname = local.gateway_internal_hostname
portNumber = local.gateway_internal_port_number
url = local.gateway_internal_url
}
}

0 comments on commit 84f9938

Please sign in to comment.