diff --git a/terraform/modules/cos/main.tf b/terraform/modules/cos/main.tf index 4336d00..67b0265 100644 --- a/terraform/modules/cos/main.tf +++ b/terraform/modules/cos/main.tf @@ -40,7 +40,8 @@ module "ssc" { } module "tempo" { - source = "git::https://github.com/canonical/observability//terraform/modules/tempo" + # TODO: remove ref before merging + source = "git::https://github.com/canonical/observability//terraform/modules/tempo?ref=TAP-158" model_name = var.model_name channel = var.channel compactor_units = var.tempo_compactor_units @@ -288,6 +289,20 @@ resource "juju_integration" "grafana_catalogue" { } } +resource "juju_integration" "tempo_catalogue" { + model = var.model_name + + application { + name = module.catalogue.app_name + endpoint = module.catalogue.endpoints.catalogue + } + + application { + name = module.tempo.app_names.tempo_coordinator + endpoint = module.tempo.endpoints.catalogue + } +} + # Provided by Traefik resource "juju_integration" "catalogue_ingress" { @@ -332,6 +347,20 @@ resource "juju_integration" "loki_ingress" { } } +resource "juju_integration" "tempo_ingress" { + model = var.model_name + + application { + name = module.traefik.app_name + endpoint = module.traefik.endpoints.traefik_route + } + + application { + name = module.tempo.app_names.tempo_coordinator + endpoint = module.tempo.endpoints.ingress + } +} + # Grafana agent resource "juju_integration" "agent_loki_metrics" { diff --git a/terraform/modules/tempo/outputs.tf b/terraform/modules/tempo/outputs.tf index 66e0ebe..464eca7 100644 --- a/terraform/modules/tempo/outputs.tf +++ b/terraform/modules/tempo/outputs.tf @@ -16,10 +16,12 @@ output "app_names" { output "endpoints" { value = { # Requires - logging = "logging", - ingress = "ingress", - certificates = "certificates", - send-remote-write = "send-remote-write", + logging = "logging", + ingress = "ingress", + certificates = "certificates", + send-remote-write = "send-remote-write", + receive_datasource = "receive-datasource" + catalogue = "catalogue", # Provides tempo_cluster = "tempo-cluster"