From 16787951e06c0b73a7c75b45045bbd8d15776f12 Mon Sep 17 00:00:00 2001 From: Alastair Lock Date: Fri, 24 Jul 2026 10:09:10 +0100 Subject: [PATCH] DTOSS-13497: Put data reader back in Remove GUIDS and instead use an Azure data reader. --- .gitleaksignore | 6 ------ infrastructure/environments/dev/variables.tfvars | 1 - .../environments/preprod/variables.tfvars | 1 - infrastructure/environments/prod/variables.tfvars | 1 - .../environments/review/variables.tfvars | 1 - infrastructure/modules/arc-infra/arc.tf | 14 +++++--------- infrastructure/modules/arc-infra/variables.tf | 5 ----- infrastructure/terraform/main.tf | 1 - infrastructure/terraform/variables.tf | 5 ----- 9 files changed, 5 insertions(+), 30 deletions(-) diff --git a/.gitleaksignore b/.gitleaksignore index cbfb0ad5..4bca537f 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -109,9 +109,3 @@ feafe758d7c1e85472cc81c5c275aae9ec078cef:tests/services/dicom/test_upload_proces feafe758d7c1e85472cc81c5c275aae9ec078cef:tests/services/dicom/test_upload_processor.py:ipv4:131 feafe758d7c1e85472cc81c5c275aae9ec078cef:tests/services/dicom/test_upload_processor.py:ipv4:150 feafe758d7c1e85472cc81c5c275aae9ec078cef:tests/services/dicom/test_upload_processor.py:ipv4:174 - -# Ignore the SCREENING_ENTRA_GROUP_ID -infrastructure/environments/prod/variables.tfvars:generic-api-key:2 -infrastructure/environments/preprod/variables.tfvars:generic-api-key:2 -infrastructure/environments/dev/variables.tfvars:generic-api-key:2 -infrastructure/environments/review/variables.tfvars:generic-api-key:2 diff --git a/infrastructure/environments/dev/variables.tfvars b/infrastructure/environments/dev/variables.tfvars index 0ba14f7a..8c755582 100644 --- a/infrastructure/environments/dev/variables.tfvars +++ b/infrastructure/environments/dev/variables.tfvars @@ -1,2 +1 @@ enable_gateway_test_vm = true -screening_entra_group_id = "f20d9f9a-b1ac-4875-a5e1-f9dfc0307c34" diff --git a/infrastructure/environments/preprod/variables.tfvars b/infrastructure/environments/preprod/variables.tfvars index 34c404fa..f560dcbc 100644 --- a/infrastructure/environments/preprod/variables.tfvars +++ b/infrastructure/environments/preprod/variables.tfvars @@ -1,2 +1 @@ # All values use defaults: enable_gateway_test_vm = false, enable_arc_servers = true -screening_entra_group_id = "ab8fd001-2722-4118-9659-3d4425db7894" diff --git a/infrastructure/environments/prod/variables.tfvars b/infrastructure/environments/prod/variables.tfvars index bcf01cdf..f560dcbc 100644 --- a/infrastructure/environments/prod/variables.tfvars +++ b/infrastructure/environments/prod/variables.tfvars @@ -1,2 +1 @@ # All values use defaults: enable_gateway_test_vm = false, enable_arc_servers = true -screening_entra_group_id = "3b2b22b0-ac8e-4904-a94b-9010ff08698a" diff --git a/infrastructure/environments/review/variables.tfvars b/infrastructure/environments/review/variables.tfvars index 2a9578a0..8c755582 100644 --- a/infrastructure/environments/review/variables.tfvars +++ b/infrastructure/environments/review/variables.tfvars @@ -1,2 +1 @@ enable_gateway_test_vm = true -screening_entra_group_id = "14f915c3-ef0a-471b-b9bf-31187d18f8b6" diff --git a/infrastructure/modules/arc-infra/arc.tf b/infrastructure/modules/arc-infra/arc.tf index d8d7127b..58ab3b44 100644 --- a/infrastructure/modules/arc-infra/arc.tf +++ b/infrastructure/modules/arc-infra/arc.tf @@ -12,12 +12,11 @@ data "azuread_service_principal" "arc_onboarding" { display_name = "spn-azure-arc-onboarding-screening-${var.env_config}" } -# Awaiting approval from Administrator team, a bit of push back with regards to giving Group.Read.All permission to the service principal, so for now we will use the group ID from the environment variable instead of looking it up by name. # Look up the Entra ID group that manages this environment -# data "azuread_group" "screening" { -# count = var.enable_arc_servers ? 1 : 0 -# display_name = "screening_${var.app_short_name}_${var.env_config}" -# } +data "azuread_group" "screening" { + count = var.enable_arc_servers ? 1 : 0 + display_name = "screening_${var.app_short_name}_${var.env_config}" +} # Assign "Azure Connected Machine Onboarding" role to allow Arc server enrollment module "arc_onboarding_role" { @@ -38,8 +37,5 @@ module "arc_wac_admin_login_role" { scope = data.azurerm_resource_group.arc_enabled_servers[0].id role_definition_name = "Windows Admin Center Administrator Login" - # Awaiting approval from Administrator team, a bit of push back with regards to giving Group.Read.All permission to the service principal, so for now we will use the group ID from the environment variable instead of looking it up by name. - # principal_id = data.azuread_group.screening[0].object_id - principal_id = var.screening_entra_group_id - + principal_id = data.azuread_group.screening[0].object_id } diff --git a/infrastructure/modules/arc-infra/variables.tf b/infrastructure/modules/arc-infra/variables.tf index cd2fb9f2..412cfe8b 100644 --- a/infrastructure/modules/arc-infra/variables.tf +++ b/infrastructure/modules/arc-infra/variables.tf @@ -28,8 +28,3 @@ variable "static_arc_machine_names" { type = list(string) default = [] } - -variable "screening_entra_group_id" { - description = "Group ID for the environment" - type = string -} diff --git a/infrastructure/terraform/main.tf b/infrastructure/terraform/main.tf index fe5dbb42..6c9f1101 100644 --- a/infrastructure/terraform/main.tf +++ b/infrastructure/terraform/main.tf @@ -11,7 +11,6 @@ module "arc_infra" { env_config = var.env_config resource_group_name = local.resource_group_name enable_arc_servers = var.enable_arc_servers - screening_entra_group_id = var.screening_entra_group_id # Create the HC for the test VM in the same run as VM creation. # The Arc data source won't see a machine registered in the same apply. diff --git a/infrastructure/terraform/variables.tf b/infrastructure/terraform/variables.tf index 21a73b95..db894346 100644 --- a/infrastructure/terraform/variables.tf +++ b/infrastructure/terraform/variables.tf @@ -44,11 +44,6 @@ variable "bastion_sku" { default = "Standard" } -variable "screening_entra_group_id" { - description = "Group ID for the environment" - type = string -} - variable "gateway_test_vm_size" { description = "SKU size for the gateway test VM" type = string