From 9d057ed45fad67dd331d144a97631577905b7460 Mon Sep 17 00:00:00 2001 From: Jacob Woffenden Date: Tue, 26 Nov 2024 12:53:47 +0000 Subject: [PATCH 1/2] I missed this hardcoded region Signed-off-by: Jacob Woffenden --- .../modules/grafana/amazon-prometheus-query-source/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/observability-platform/modules/grafana/amazon-prometheus-query-source/main.tf b/terraform/environments/observability-platform/modules/grafana/amazon-prometheus-query-source/main.tf index 0539fccac03..e15652c448d 100644 --- a/terraform/environments/observability-platform/modules/grafana/amazon-prometheus-query-source/main.tf +++ b/terraform/environments/observability-platform/modules/grafana/amazon-prometheus-query-source/main.tf @@ -1,6 +1,6 @@ locals { name = "${var.name}-amp" - url = "https://aps-workspaces.eu-west-2.amazonaws.com/workspaces/${var.amazon_prometheus_workspace_id}/" + url = "https://aps-workspaces.${var.amazon_prometheus_workspace_region}.amazonaws.com/workspaces/${var.amazon_prometheus_workspace_id}/" } resource "grafana_data_source" "this" { From 8bc374a91452e3b311ceaa44e20b509a272babf1 Mon Sep 17 00:00:00 2001 From: Jacob Woffenden Date: Tue, 26 Nov 2024 12:59:58 +0000 Subject: [PATCH 2/2] need to review this code, i dont to explicity set these Signed-off-by: Jacob Woffenden --- .../environment-configurations.tf | 65 ++++++++++--------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/terraform/environments/observability-platform/environment-configurations.tf b/terraform/environments/observability-platform/environment-configurations.tf index 92a482a2cfa..97163b141d1 100644 --- a/terraform/environments/observability-platform/environment-configurations.tf +++ b/terraform/environments/observability-platform/environment-configurations.tf @@ -28,20 +28,22 @@ locals { athena_enabled = false }, "analytical-platform-compute-development" = { - cloudwatch_enabled = true - prometheus_push_enabled = false - amazon_prometheus_query_enabled = true - amazon_prometheus_workspace_id = "ws-bfdd5d7a-5571-4686-bfd4-43ab07cf8d54ba" - xray_enabled = true - athena_enabled = false + cloudwatch_enabled = true + prometheus_push_enabled = false + amazon_prometheus_query_enabled = true + amazon_prometheus_workspace_region = "eu-west-2" + amazon_prometheus_workspace_id = "ws-bfdd5d7a-5571-4686-bfd4-43ab07cf8d54ba" + xray_enabled = true + athena_enabled = false }, "analytical-platform-compute-test" = { - cloudwatch_enabled = true - prometheus_push_enabled = false - amazon_prometheus_query_enabled = true - amazon_prometheus_workspace_id = "ws-a9d7f576-58b7-4748-b4c1-b02bbdc54a2922" - xray_enabled = true - athena_enabled = false + cloudwatch_enabled = true + prometheus_push_enabled = false + amazon_prometheus_query_enabled = true + amazon_prometheus_workspace_region = "eu-west-2" + amazon_prometheus_workspace_id = "ws-a9d7f576-58b7-4748-b4c1-b02bbdc54a2922" + xray_enabled = true + athena_enabled = false } } }, @@ -128,28 +130,31 @@ locals { identity_centre_team = "analytical-platform" aws_accounts = { "analytical-platform-compute-development" = { - cloudwatch_enabled = true - prometheus_push_enabled = false - amazon_prometheus_query_enabled = true - amazon_prometheus_workspace_id = "ws-bfdd5d7a-5571-4686-bfd4-43ab07cf8d54ba" - xray_enabled = true - athena_enabled = false + cloudwatch_enabled = true + prometheus_push_enabled = false + amazon_prometheus_query_enabled = true + amazon_prometheus_workspace_region = "eu-west-2" + amazon_prometheus_workspace_id = "ws-bfdd5d7a-5571-4686-bfd4-43ab07cf8d54ba" + xray_enabled = true + athena_enabled = false }, "analytical-platform-compute-production" = { - cloudwatch_enabled = true - prometheus_push_enabled = false - amazon_prometheus_query_enabled = true - amazon_prometheus_workspace_id = "ws-257796b7-4aa4-4c18-b906-6dd21e95d7b73e" - xray_enabled = true - athena_enabled = false + cloudwatch_enabled = true + prometheus_push_enabled = false + amazon_prometheus_query_enabled = true + amazon_prometheus_workspace_region = "eu-west-2" + amazon_prometheus_workspace_id = "ws-257796b7-4aa4-4c18-b906-6dd21e95d7b73e" + xray_enabled = true + athena_enabled = false }, "analytical-platform-compute-test" = { - cloudwatch_enabled = true - prometheus_push_enabled = false - amazon_prometheus_query_enabled = true - amazon_prometheus_workspace_id = "ws-a9d7f576-58b7-4748-b4c1-b02bbdc54a2922" - xray_enabled = true - athena_enabled = false + cloudwatch_enabled = true + prometheus_push_enabled = false + amazon_prometheus_query_enabled = true + amazon_prometheus_workspace_region = "eu-west-2" + amazon_prometheus_workspace_id = "ws-a9d7f576-58b7-4748-b4c1-b02bbdc54a2922" + xray_enabled = true + athena_enabled = false }, "analytical-platform-ingestion-development" = { cloudwatch_enabled = true