File tree Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1+ resource "azurerm_monitor_action_group" "monitor_action_group" {
2+ name = " ${ local . prefix } -ag001"
3+ resource_group_name = azurerm_resource_group. logging_rg . name
4+ tags = var. tags
5+
6+ enabled = true
7+ short_name = substr (local. prefix , 0 , 11 )
8+ dynamic "email_receiver" {
9+ for_each = var. alert_endpoints . email == null ? [] : [1 ]
10+ content {
11+ name = local. prefix
12+ email_address = email_receiver. value . email_address
13+ use_common_alert_schema = true
14+ }
15+ }
16+ }
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ resource "azapi_resource" "function" {
189189 azureStorageAccounts = {}
190190 detailedErrorLoggingEnabled = true
191191 functionAppScaleLimit = 0
192- functionsRuntimeScaleMonitoringEnabled = true
192+ functionsRuntimeScaleMonitoringEnabled = false
193193 ftpsState = " Disabled"
194194 healthCheckPath = var.function_health_path
195195 http20Enabled = true
Original file line number Diff line number Diff line change @@ -102,6 +102,22 @@ variable "my_secret" {
102102 }
103103}
104104
105+ # Monitoring variables
106+ variable "alert_endpoints" {
107+ description = " Specifies the alert details."
108+ type = object ({
109+ email = optional (object ({
110+ email_address = string
111+ }), null )
112+ })
113+ sensitive = false
114+ default = {}
115+ validation {
116+ condition = var. alert_endpoints == {} || length (var. alert_endpoints ) > 0
117+ error_message = " Please specify valid alert endpoints."
118+ }
119+ }
120+
105121# Network variables
106122variable "vnet_id" {
107123 description = " Specifies the resource ID of the Vnet used for the Azure Function."
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ vnet_id = "/subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGr
1616nsg_id = " /subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-function-network-rg/providers/Microsoft.Network/networkSecurityGroups/mycrp-prd-function-nsg001"
1717route_table_id = " /subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-function-network-rg/providers/Microsoft.Network/routeTables/mycrp-prd-function-rt001"
1818
19+ # Monitoring variables
20+ alert_endpoints = {}
21+
1922# DNS variables
2023private_dns_zone_id_blob = " /subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net"
2124private_dns_zone_id_queue = " /subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.queue.core.windows.net"
You can’t perform that action at this time.
0 commit comments