From b7b587ee2dedea26c90698ff4028075fc91e0ce3 Mon Sep 17 00:00:00 2001 From: Bengt Fredh Date: Wed, 20 Nov 2024 11:43:29 +0100 Subject: [PATCH 1/4] Add broker/corr as grafan editors --- .../altinn-monitor-test-rg/grafana.tf | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf index 8b47bfc3..487ce4ae 100644 --- a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf +++ b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf @@ -38,12 +38,23 @@ resource "azurerm_role_assignment" "grafana_identity_reader" { } locals { - altinn_30_developers = "416302ed-fbab-41a4-8c8d-61f486fa79ca" - altinn_30_developers_prod = "2d962017-75cf-47f2-a76e-50591fbf7fe9" - altinn_30_operations = "143ed28a-6e6d-4ca0-8273-eecb9c1665ba" - altinn_30_operations_prod = "5a5ed585-9f7c-4b94-80af-9ceee8124db3" - grafana_editor = [local.altinn_30_developers, local.altinn_30_developers_prod] - grafana_admin = [local.altinn_30_operations, local.altinn_30_operations_prod] + altinn_30_developers = "416302ed-fbab-41a4-8c8d-61f486fa79ca" + altinn_30_developers_prod = "2d962017-75cf-47f2-a76e-50591fbf7fe9" + altinn_30_broker_test_developers = "9b99f951-3873-4310-8baf-464b4da43f26" + altinn_30_broker_prod_developers = "7708786a-aa50-4ce8-9f7f-e85459357de1" + altinn_30_correspondence_prod_developer = "89627577-7e88-446b-a64b-699a9208343c" + altinn_30_correspondence_test_developer = "12b73376-8726-493c-8d27-aa87e5213e6b" + altinn_30_operations = "143ed28a-6e6d-4ca0-8273-eecb9c1665ba" + altinn_30_operations_prod = "5a5ed585-9f7c-4b94-80af-9ceee8124db3" + grafana_editor = [ + local.altinn_30_developers, + local.altinn_30_developers_prod, + local.altinn_30_broker_test_developers, + local.altinn_30_broker_prod_developers, + local.altinn_30_correspondence_prod_developer, + local.altinn_30_correspondence_test_developer + ] + grafana_admin = [local.altinn_30_operations, local.altinn_30_operations_prod] } resource "azurerm_role_assignment" "grafana_admin" { @@ -56,7 +67,7 @@ resource "azurerm_role_assignment" "grafana_admin" { } resource "azurerm_role_assignment" "grafana_editors" { - for_each = { for value in local.grafana_editor : value => value if value != null } + for_each = { for value in altinn_30_broker_prod_developerslocal.grafana_editor : value => value if value != null } scope = azurerm_dashboard_grafana.grafana.id role_definition_name = "Grafana Editor" principal_id = each.value From d436ee0bb041dd0341fd640ebd97bb112490c129 Mon Sep 17 00:00:00 2001 From: Bengt Fredh Date: Wed, 20 Nov 2024 11:48:33 +0100 Subject: [PATCH 2/4] Add broker/corr as grafan editors --- .../adminservices-test/altinn-monitor-test-rg/grafana.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf index 487ce4ae..3e05cba3 100644 --- a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf +++ b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf @@ -67,7 +67,7 @@ resource "azurerm_role_assignment" "grafana_admin" { } resource "azurerm_role_assignment" "grafana_editors" { - for_each = { for value in altinn_30_broker_prod_developerslocal.grafana_editor : value => value if value != null } + for_each = { for value in local.grafana_editor : value => value if value != null } scope = azurerm_dashboard_grafana.grafana.id role_definition_name = "Grafana Editor" principal_id = each.value From 08a1b9c6f3d3080da1af1fc16af4d6aa4e80b4db Mon Sep 17 00:00:00 2001 From: Renato Monteiro <45536168+monteiro-renato@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:59:26 +0100 Subject: [PATCH 3/4] nit: sort them alphabetically (#1123) --- .../altinn-monitor-test-rg/grafana.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf index 3e05cba3..760af07c 100644 --- a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf +++ b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf @@ -38,21 +38,21 @@ resource "azurerm_role_assignment" "grafana_identity_reader" { } locals { - altinn_30_developers = "416302ed-fbab-41a4-8c8d-61f486fa79ca" - altinn_30_developers_prod = "2d962017-75cf-47f2-a76e-50591fbf7fe9" - altinn_30_broker_test_developers = "9b99f951-3873-4310-8baf-464b4da43f26" altinn_30_broker_prod_developers = "7708786a-aa50-4ce8-9f7f-e85459357de1" + altinn_30_broker_test_developers = "9b99f951-3873-4310-8baf-464b4da43f26" altinn_30_correspondence_prod_developer = "89627577-7e88-446b-a64b-699a9208343c" altinn_30_correspondence_test_developer = "12b73376-8726-493c-8d27-aa87e5213e6b" + altinn_30_developers = "416302ed-fbab-41a4-8c8d-61f486fa79ca" + altinn_30_developers_prod = "2d962017-75cf-47f2-a76e-50591fbf7fe9" altinn_30_operations = "143ed28a-6e6d-4ca0-8273-eecb9c1665ba" altinn_30_operations_prod = "5a5ed585-9f7c-4b94-80af-9ceee8124db3" grafana_editor = [ - local.altinn_30_developers, - local.altinn_30_developers_prod, - local.altinn_30_broker_test_developers, local.altinn_30_broker_prod_developers, + local.altinn_30_broker_test_developers, local.altinn_30_correspondence_prod_developer, local.altinn_30_correspondence_test_developer + local.altinn_30_developers, + local.altinn_30_developers_prod, ] grafana_admin = [local.altinn_30_operations, local.altinn_30_operations_prod] } From c5a7a1e120aeedd2ec661ae9fae51ad35f62c3b6 Mon Sep 17 00:00:00 2001 From: Bengt Fredh Date: Wed, 20 Nov 2024 12:01:26 +0100 Subject: [PATCH 4/4] Add broker/corr as grafan editors --- .../adminservices-test/altinn-monitor-test-rg/grafana.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf index 760af07c..4ccfbead 100644 --- a/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf +++ b/infrastructure/adminservices-test/altinn-monitor-test-rg/grafana.tf @@ -50,9 +50,9 @@ locals { local.altinn_30_broker_prod_developers, local.altinn_30_broker_test_developers, local.altinn_30_correspondence_prod_developer, - local.altinn_30_correspondence_test_developer + local.altinn_30_correspondence_test_developer, local.altinn_30_developers, - local.altinn_30_developers_prod, + local.altinn_30_developers_prod ] grafana_admin = [local.altinn_30_operations, local.altinn_30_operations_prod] }