Skip to content

Commit 4c803d6

Browse files
committed
wip
1 parent 6703c57 commit 4c803d6

3 files changed

Lines changed: 38 additions & 4 deletions

File tree

.gitleaksignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ infrastructure/terraform/hub/data.tf:generic-api-key:22
3535
infrastructure/terraform/resource_group_init/core.bicep:generic-api-key:11
3636
infrastructure/terraform/resource_group_init/keyVault.bicep:generic-api-key:10
3737
infrastructure/terraform/resource_group_init/main.bicep:generic-api-key:30
38+
infrastructure/terraform/hub/virtual_desktop.tf:generic-api-key:22
39+
infrastructure/terraform/hub/virtual_desktop.tf:generic-api-key:23
40+
infrastructure/terraform/hub/virtual_desktop.tf:generic-api-key:24

docs/infrastructure/new-subscription-setup.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,19 @@ The following quotas need to be increased, raise a support ticket with Azure sup
5252
| Lung Cancer Risk Check - Review | ****** | Review | UK South | N/A | N/A | Regional deployment | Compute | B_Standard_B1ms | N/A | Units | 1 | 1 | 1 | 1 | 1 | 1 |
5353
| Lung Cancer Risk Check - Prod | ****** | Prod | UK South | N/A | N/A | Regional deployment | Compute | GP_Standard_D2ds_v5| N/A | Units | 3 | 3 | 3 | 3 | 3 | 3 |
5454
| Lung Cancer Risk Check - Preprod | ****** | Preprod | UK South | N/A | N/A | Regional deployment | Compute | GP_Standard_D2ds_v5| N/A | Units | 3 | 3 | 3 | 3 | 3 | 3 |
55+
56+
57+
alastairlock@Mac lung_cancer_screening % az feature register \
58+
--namespace Microsoft.Compute \
59+
--name EncryptionAtHost
60+
61+
Once the feature 'EncryptionAtHost' is registered, invoking 'az provider register -n Microsoft.Compute' is required to get the change propagated
62+
{
63+
"id": "/subscriptions/819ef61d-786e-4906-bbd7-9061b095a91d/providers/Microsoft.Features/providers/Microsoft.Compute/features/EncryptionAtHost",
64+
"name": "Microsoft.Compute/EncryptionAtHost",
65+
"properties": {
66+
"state": "Registered"
67+
},
68+
"type": "Microsoft.Features/providers/features"
69+
}
70+
alastairlock@Mac lung_cancer_screening %

infrastructure/terraform/hub/virtual_desktop.tf

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ locals {
1919
var.virtual_desktop_group_active == "both-with-blue-primary-but-equal-vms" || var.virtual_desktop_group_active == "both-with-green-primary-but-equal-vms"
2020
)
2121

22+
entra_users_group_id = "14fb0025-1031-4f11-b374-837f2b9453c1"
23+
entra_admins_group_id = "22f7249-6d90-493a-97f8-137eb9aac9bc"
24+
principal_id = "9cdead84-a844-4324-93f2-b2e6bb768d07"
2225
}
2326

2427
resource "azurerm_resource_group" "avd-blue" {
@@ -28,6 +31,17 @@ resource "azurerm_resource_group" "avd-blue" {
2831
location = each.key
2932
}
3033

34+
resource "azurerm_role_assignment" "avd_autoscale_blue" {
35+
for_each = (local.deploy_blue_avd ? var.regions : {})
36+
37+
scope = azurerm_resource_group.avd-blue[each.key].id
38+
role_definition_name = "Desktop Virtualization Contributor"
39+
40+
# Azure Virtual Desktop autoscale service principal (Microsoft-managed)
41+
principal_id = local.principal_id
42+
}
43+
44+
3145
module "virtual-desktop-blue" {
3246
for_each = (local.deploy_blue_avd ? var.regions : {})
3347

@@ -45,7 +59,7 @@ module "virtual-desktop-blue" {
4559
# : data.azuread_group.avd_users.id
4660
# )
4761

48-
entra_users_group_id = "14fb0025-1031-4f11-b374-837f2b9453c1"
62+
entra_users_group_id = local.entra_users_group_id
4963

5064

5165
# entra_admins_group_id = (
@@ -54,7 +68,7 @@ module "virtual-desktop-blue" {
5468
# : data.azuread_group.avd_admins.id
5569
# )
5670

57-
entra_admins_group_id = "22f7249-6d90-493a-97f8-137eb9aac9bc"
71+
entra_admins_group_id = local.entra_admins_group_id
5872

5973
maximum_sessions_allowed = var.avd_maximum_sessions_allowed
6074
resource_group_name = azurerm_resource_group.avd-blue[each.key].name
@@ -105,14 +119,15 @@ module "virtual-desktop-green" {
105119
# : data.azuread_group.avd_users.id
106120
# )
107121

108-
entra_users_group_id = "14fb0025-1031-4f11-b374-837f2b9453c1"
122+
entra_users_group_id = local.entra_users_group_id
109123

110124
# entra_admins_group_id = (
111125
# local.green_avd_primary
112126
# ? data.azuread_group.avd_admins.id
113127
# : data.azuread_group.avd_admins.id
114128
# )
115-
entra_admins_group_id = "22f7249-6d90-493a-97f8-137eb9aac9bc"
129+
130+
entra_admins_group_id = local.entra_admins_group_id
116131

117132
maximum_sessions_allowed = var.avd_maximum_sessions_allowed
118133
resource_group_name = azurerm_resource_group.avd-green[each.key].name

0 commit comments

Comments
 (0)