From a09d342152352ef569f3d52365b441372eb0c449 Mon Sep 17 00:00:00 2001 From: Paul Larson Date: Tue, 3 Oct 2023 04:49:23 -0500 Subject: [PATCH] Inject sentry_dsn as a string and expand vars in it (#46) * Inject sentry_dsn as a string and expand vars in it * use self._app_environment as a property --- backend/charm/src/charm.py | 2 +- terraform/test-observer.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/charm/src/charm.py b/backend/charm/src/charm.py index 427990dc..cde4a94d 100755 --- a/backend/charm/src/charm.py +++ b/backend/charm/src/charm.py @@ -185,7 +185,7 @@ def _pebble_layer(self) -> Layer: ] ), "startup": "enabled", - "environment": self._app_environment(), + "environment": self._app_environment, } }, } diff --git a/terraform/test-observer.tf b/terraform/test-observer.tf index 3a501db6..da80f369 100644 --- a/terraform/test-observer.tf +++ b/terraform/test-observer.tf @@ -77,7 +77,7 @@ resource "juju_application" "test-observer-api" { config = { hostname = var.environment == "staging" ? "test-observer-api-staging.${var.external_ingress_hostname}" : "test-observer-api.${var.external_ingress_hostname}" port = var.environment == "development" ? 30000 : 443 - sentry_dsn = {local.sentry_dsn_map[var.environment]} + sentry_dsn = "${local.sentry_dsn_map[var.environment]}" } units = 1