Skip to content

Commit f729c13

Browse files
committed
Add alerts to the container app
1 parent 25275d9 commit f729c13

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

infrastructure/modules/cdn-frontdoor-profile/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ resource "azurerm_cdn_frontdoor_secret" "this" {
3333
module "diagnostic-settings" {
3434
source = "../diagnostic-settings"
3535

36-
count = var.log_analytics_workspace_id != null ? 1 : 0
36+
# count = var.log_analytics_workspace_id != null ? 1 : 0
3737

3838
name = "${var.name}-diagnostic-setting"
3939
target_resource_id = azurerm_cdn_frontdoor_profile.this.id

infrastructure/modules/virtual-desktop/main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ resource "azurerm_virtual_desktop_workspace_application_group_association" "this
5858
workspace_id = azurerm_virtual_desktop_workspace.this.id
5959
}
6060

61+
resource "azurerm_role_assignment" "avd_autoscale_hostpool" {
62+
scope = azurerm_virtual_desktop_host_pool.this.id
63+
role_definition_name = "Desktop Virtualization Power On Off Contributor"
64+
principal_id = var.principal_id
65+
}
66+
6167
resource "azurerm_role_assignment" "rg_users" {
6268
scope = var.resource_group_id
6369
role_definition_name = "Virtual Machine User Login"

infrastructure/modules/virtual-desktop/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,8 @@ variable "tags" {
187187
type = map(string)
188188
default = {}
189189
}
190+
191+
variable "principal_id" {
192+
description = "The principal id (object id) of the identity to assign the 'Desktop Virtualization Power On Off Contributor' role to the host pool."
193+
type = string
194+
}

0 commit comments

Comments
 (0)