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" {
189
189
azureStorageAccounts = {}
190
190
detailedErrorLoggingEnabled = true
191
191
functionAppScaleLimit = 0
192
- functionsRuntimeScaleMonitoringEnabled = true
192
+ functionsRuntimeScaleMonitoringEnabled = false
193
193
ftpsState = " Disabled"
194
194
healthCheckPath = var.function_health_path
195
195
http20Enabled = true
Original file line number Diff line number Diff line change @@ -102,6 +102,22 @@ variable "my_secret" {
102
102
}
103
103
}
104
104
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
+
105
121
# Network variables
106
122
variable "vnet_id" {
107
123
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
16
16
nsg_id = " /subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-function-network-rg/providers/Microsoft.Network/networkSecurityGroups/mycrp-prd-function-nsg001"
17
17
route_table_id = " /subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-function-network-rg/providers/Microsoft.Network/routeTables/mycrp-prd-function-rt001"
18
18
19
+ # Monitoring variables
20
+ alert_endpoints = {}
21
+
19
22
# DNS variables
20
23
private_dns_zone_id_blob = " /subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net"
21
24
private_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