File tree Expand file tree Collapse file tree
infrastructure/terraform/hub Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ resource "azurerm_resource_group" "avd_blue" {
3131 location = each. key
3232}
3333
34+ resource "azurerm_role_assignment" "avd_autoscale_blue_hostpool" {
35+ for_each = local. deploy_blue_avd ? var. regions : {}
36+
37+ scope = module. virtual-desktop-blue [each . key ]. host_pool_id
38+ role_definition_name = " Desktop Virtualization Host Pool Contributor"
39+
40+ principal_id = local. principal_id
41+ principal_type = " ServicePrincipal"
42+ }
43+
3444# resource "azurerm_role_assignment" "avd_autoscale_blue" {
3545# for_each = (local.deploy_blue_avd ? var.regions : {})
3646
@@ -112,6 +122,12 @@ module "virtual-desktop-blue" {
112122
113123 tags = var. tags
114124
125+ depends_on = [
126+ azurerm_role_assignment . avd_autoscale_blue_hostpool
127+ # azurerm_role_assignment.avd_autoscale_blue_dvc,
128+ # azurerm_role_assignment.avd_autoscale_blue_vm
129+ ]
130+
115131}
116132
117133resource "azurerm_resource_group" "avd_green" {
You can’t perform that action at this time.
0 commit comments