diff --git a/docs/content/patterns/specialized/avd/Whats-New.md b/docs/content/patterns/specialized/avd/Whats-New.md index f94f3e511..90fbe9269 100644 --- a/docs/content/patterns/specialized/avd/Whats-New.md +++ b/docs/content/patterns/specialized/avd/Whats-New.md @@ -8,6 +8,10 @@ For information on what's new please refer to the [Releases](https://github.com/ To update your current deployment with the content from the latest release, please refer to the [Update to new release](Update-to-new-Release.md) page. +## 2024-11-20 +### Deployment Names over 64 characters +An issue was discovered in which the deployment for some alerts would fail if the deployment name was over 64 characters. This was due to the Storage Account and/or ANF Volume names being too long and appended to the deployment name. Those names are now truncated if over 20 characters. + ## 2024-01-25 ### New features Initial relocation from the Azure AVD Accelerator Brownfield with AVD specific Alerts on a per Host Pool basis. diff --git a/docs/content/patterns/specialized/avd/_index.md b/docs/content/patterns/specialized/avd/_index.md index d20f1de90..ab0120e20 100644 --- a/docs/content/patterns/specialized/avd/_index.md +++ b/docs/content/patterns/specialized/avd/_index.md @@ -7,15 +7,15 @@ geekdocCollapseSection: true This solution provides a baseline of alerts for AVD that are disabled by default and for ensuring administrators and staff get meaningful and timely alerts when there are problems related to an AVD deployment. The deployment has been tested in Azure Global and Azure US Government and will incorporate storage alerts for either or both Azure Files and/or Azure Netapp Files. This solution initially was part of the Azure Virtual Desktop Solution Accelerator as a brownfield and moved to this location. -**Current Version:** -v2.1.5 (Dec 5, 2023) +**Current Version:** +v2.1.6 (Nov 20, 2024) ## Alerts Table Table below shows the Alert Names however the number of alert rules created may be multiple based on different severity and/or additional volume or storage name designators. For example, a deployment with a single Azure Files Storage Account and an Azure NetApp Files Volume would yield 20 alert rules created. [(Excel Table)](https://github.com/Azure/azure-monitor-baseline-alerts/raw/main/docs/static/img/Avd/alerts.xlsx) | Name | Threshold(s) (Severity) | Signal Type | Frequency | # Alert Rules | -|--- |--- |--- |--- |--- +|--- |--- |--- |--- |--- | | AVD-HostPool-Capacity (1.) | 95% (1) / 85% (2) / 50% (3)| Log Analytics | 5 min | 3/hostpool | | AVD-HostPool-Disconnected User over n Hours (hostpoolname) | 24 (1) / 72 (2) | Log Analytics | 1 hour | 2/hostpool | | AVD-HostPool-No Resources Available (hostpoolname) | Any are Sev1 | Log Analytics | 15 min | 1/hostpool | @@ -43,10 +43,10 @@ Table below shows the Alert Names however the number of alert rules created may | AVD-ServiceHealth-Security | na | Service Health | na | 4 | | AVD-ServiceHealth-Service Issue | na | Service Health | na | 4 | -**NOTES:** -1. Alert based on associated Automation Account / Runbook -2. See the following for custom condition. Note that both Standard and Premium values are incorporated into the alert rule. ['How to create an alert if a file share is throttled'](https://docs.microsoft.com/azure/storage/files/storage-troubleshooting-files-performance#how-to-create-an-alert-if-a-file-share-is-throttled) -Service Health - The alert severity cannot be set or changed from 'Verbose' +**NOTES:** +1. Alert based on associated Automation Account / Runbook +2. See the following for custom condition. Note that both Standard and Premium values are incorporated into the alert rule. ['How to create an alert if a file share is throttled'](https://docs.microsoft.com/azure/storage/files/storage-troubleshooting-files-performance#how-to-create-an-alert-if-a-file-share-is-throttled) +Service Health - The alert severity cannot be set or changed from 'Verbose' ## 📣Feedback 📣 diff --git a/patterns/avd/avdArm.json b/patterns/avd/avdArm.json index e2292757d..c0cf281d3 100644 --- a/patterns/avd/avdArm.json +++ b/patterns/avd/avdArm.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "4187096250605177316" + "version": "0.31.92.45157", + "templateHash": "10824749438491777673" } }, "parameters": { @@ -154,7 +154,7 @@ } ], "ActionGroupName": "[format('ag-avdmetrics-{0}-{1}', parameters('Environment'), parameters('Location'))]", - "AlertDescriptionHeader": "Automated AVD Alert Deployment Solution (v2.1.5)\n", + "AlertDescriptionHeader": "Automated AVD Alert Deployment Solution (v2.1.6)\n", "AutomationAccountName": "[format('aa-avdmetrics-{0}-{1}-{2}', parameters('Environment'), parameters('Location'), parameters('AlertNamePrefix'))]", "CloudEnvironment": "[environment().name]", "ResourceGroupCreate": "[if(equals(parameters('ResourceGroupStatus'), 'New'), true(), false())]", @@ -1742,8 +1742,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "15010178760090743855" + "version": "0.31.92.45157", + "templateHash": "7054048594084367533" } }, "resources": [] @@ -1779,8 +1779,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13748643536402199106" + "version": "0.31.92.45157", + "templateHash": "6556898336061409082" } }, "parameters": { @@ -1888,8 +1888,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "4065841540046378089" + "version": "0.31.92.45157", + "templateHash": "2801295372051255959" } }, "parameters": { @@ -2018,8 +2018,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "498093034878796354" + "version": "0.31.92.45157", + "templateHash": "8149434558469829985" } }, "parameters": { @@ -2390,8 +2390,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "4930253470371022993" + "version": "0.31.92.45157", + "templateHash": "6105937415708421540" } }, "parameters": { @@ -2778,8 +2778,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1936225209226397716" + "version": "0.31.92.45157", + "templateHash": "9952440806513106381" } }, "parameters": { @@ -2932,8 +2932,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "10343348577509908541" + "version": "0.31.92.45157", + "templateHash": "13728933902580343963" } }, "parameters": { @@ -3125,8 +3125,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16355881437855644491" + "version": "0.31.92.45157", + "templateHash": "7586691070306429927" } }, "parameters": { @@ -3327,8 +3327,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13266942762784094332" + "version": "0.31.92.45157", + "templateHash": "3448647286948008711" } }, "parameters": { @@ -3476,8 +3476,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "6017150840424720288" + "version": "0.31.92.45157", + "templateHash": "1088798781502901305" } }, "parameters": { @@ -3611,8 +3611,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "12497168255623114364" + "version": "0.31.92.45157", + "templateHash": "15732312081213911361" } }, "parameters": { @@ -3750,8 +3750,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1321383979596300962" + "version": "0.31.92.45157", + "templateHash": "14810314673410373698" } }, "parameters": { @@ -3933,8 +3933,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "4723293633061816660" + "version": "0.31.92.45157", + "templateHash": "4208782886811707699" } }, "parameters": { @@ -4404,8 +4404,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "2490155391384108519" + "version": "0.31.92.45157", + "templateHash": "14027054506895285773" } }, "parameters": { @@ -4601,8 +4601,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "3403408016021509565" + "version": "0.31.92.45157", + "templateHash": "800516619320849854" } }, "parameters": { @@ -4736,8 +4736,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16782741243796524245" + "version": "0.31.92.45157", + "templateHash": "16284621432925501090" } }, "parameters": { @@ -4950,8 +4950,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13450589063357475601" + "version": "0.31.92.45157", + "templateHash": "3182954352944324653" } }, "parameters": { @@ -5150,8 +5150,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11787974534224269342" + "version": "0.31.92.45157", + "templateHash": "7524819357101518089" } }, "parameters": { @@ -5737,8 +5737,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11787974534224269342" + "version": "0.31.92.45157", + "templateHash": "7524819357101518089" } }, "parameters": { @@ -6324,8 +6324,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11787974534224269342" + "version": "0.31.92.45157", + "templateHash": "7524819357101518089" } }, "parameters": { @@ -6914,8 +6914,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11787974534224269342" + "version": "0.31.92.45157", + "templateHash": "7524819357101518089" } }, "parameters": { @@ -7536,8 +7536,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1840681092109838362" + "version": "0.31.92.45157", + "templateHash": "6715209852039847392" } }, "parameters": { @@ -7640,8 +7640,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "18302503168830922420" + "version": "0.31.92.45157", + "templateHash": "17047460845541441863" } }, "parameters": { @@ -7833,8 +7833,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "5987148713698590047" + "version": "0.31.92.45157", + "templateHash": "4285222361298062136" } }, "parameters": { @@ -8158,8 +8158,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "3985494900988965675" + "version": "0.31.92.45157", + "templateHash": "5469596130899130212" } }, "parameters": { @@ -8266,8 +8266,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11594559233220382616" + "version": "0.31.92.45157", + "templateHash": "16627790300726824635" } }, "parameters": { @@ -8504,8 +8504,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "8095446035196327417" + "version": "0.31.92.45157", + "templateHash": "17476159558740499985" } }, "parameters": { @@ -8838,8 +8838,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "3985494900988965675" + "version": "0.31.92.45157", + "templateHash": "5469596130899130212" } }, "parameters": { @@ -8946,8 +8946,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11594559233220382616" + "version": "0.31.92.45157", + "templateHash": "16627790300726824635" } }, "parameters": { @@ -9184,8 +9184,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "8095446035196327417" + "version": "0.31.92.45157", + "templateHash": "17476159558740499985" } }, "parameters": { @@ -9515,8 +9515,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "180910090874233226" + "version": "0.31.92.45157", + "templateHash": "9050758326206554543" } }, "parameters": { @@ -9616,8 +9616,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11594559233220382616" + "version": "0.31.92.45157", + "templateHash": "16627790300726824635" } }, "parameters": { @@ -9854,8 +9854,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "8095446035196327417" + "version": "0.31.92.45157", + "templateHash": "17476159558740499985" } }, "parameters": { @@ -10185,8 +10185,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "6000324042661911370" + "version": "0.31.92.45157", + "templateHash": "226819917949736350" } }, "parameters": { @@ -10215,15 +10215,19 @@ "type": "object" } }, + "variables": { + "ANFVolumeResourceNameOrig": "[split(parameters('ANFVolumeResourceID'), '/')[12]]", + "ANFVolumeResourceName": "[if(less(length(variables('ANFVolumeResourceNameOrig')), 20), variables('ANFVolumeResourceNameOrig'), skip(variables('ANFVolumeResourceNameOrig'), sub(length(variables('ANFVolumeResourceNameOrig')), 20)))]" + }, "resources": [ { "copy": { - "name": "metricAlerts_VirtualMachines", + "name": "metricAlerts_ANFVolumes", "count": "[length(range(0, length(parameters('MetricAlertsANF'))))]" }, "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", - "name": "[format('c_{0}-{1}-{2}', parameters('MetricAlertsANF')[range(0, length(parameters('MetricAlertsANF')))[copyIndex()]].name, split(parameters('ANFVolumeResourceID'), '/')[12], parameters('Environment'))]", + "name": "[format('c_{0}-{1}-{2}', parameters('MetricAlertsANF')[range(0, length(parameters('MetricAlertsANF')))[copyIndex()]].name, variables('ANFVolumeResourceName'), parameters('Environment'))]", "properties": { "expressionEvaluationOptions": { "scope": "inner" @@ -10234,7 +10238,7 @@ "value": false }, "name": { - "value": "[format('{0}-{1}-{2}', parameters('MetricAlertsANF')[range(0, length(parameters('MetricAlertsANF')))[copyIndex()]].displayName, split(parameters('ANFVolumeResourceID'), '/')[12], parameters('Environment'))]" + "value": "[format('{0}-{1}-{2}', parameters('MetricAlertsANF')[range(0, length(parameters('MetricAlertsANF')))[copyIndex()]].displayName, variables('ANFVolumeResourceName'), parameters('Environment'))]" }, "criterias": { "value": "[parameters('MetricAlertsANF')[range(0, length(parameters('MetricAlertsANF')))[copyIndex()]].criteria.allOf]" @@ -10286,8 +10290,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11594559233220382616" + "version": "0.31.92.45157", + "templateHash": "16627790300726824635" } }, "parameters": { @@ -10524,8 +10528,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "8095446035196327417" + "version": "0.31.92.45157", + "templateHash": "17476159558740499985" } }, "parameters": { @@ -10855,8 +10859,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "9256535270993929306" + "version": "0.31.92.45157", + "templateHash": "17307003094358881498" } }, "parameters": { @@ -10886,6 +10890,8 @@ } }, "variables": { + "StorAcctNameOrig": "[split(parameters('StorageAccountResourceID'), '/')[8]]", + "StorAcctName": "[if(less(length(variables('StorAcctNameOrig')), 20), variables('StorAcctNameOrig'), skip(variables('StorAcctNameOrig'), sub(length(variables('StorAcctNameOrig')), 20)))]", "FileServicesResourceID": "[format('{0}/fileServices/default', parameters('StorageAccountResourceID'))]" }, "resources": [ @@ -10896,7 +10902,7 @@ }, "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", - "name": "[format('c_{0}-{1}-{2}', parameters('MetricAlertsFileShares')[range(0, length(parameters('MetricAlertsFileShares')))[copyIndex()]].name, split(variables('FileServicesResourceID'), '/')[8], parameters('Environment'))]", + "name": "[format('c_{0}-{1}-{2}', parameters('MetricAlertsFileShares')[range(0, length(parameters('MetricAlertsFileShares')))[copyIndex()]].name, variables('StorAcctName'), parameters('Environment'))]", "properties": { "expressionEvaluationOptions": { "scope": "inner" @@ -10907,7 +10913,7 @@ "value": false }, "name": { - "value": "[format('{0}-{1}-{2}', parameters('MetricAlertsFileShares')[range(0, length(parameters('MetricAlertsFileShares')))[copyIndex()]].displayName, split(variables('FileServicesResourceID'), '/')[8], parameters('Environment'))]" + "value": "[format('{0}-{1}-{2}', parameters('MetricAlertsFileShares')[range(0, length(parameters('MetricAlertsFileShares')))[copyIndex()]].displayName, variables('StorAcctName'), parameters('Environment'))]" }, "criterias": { "value": "[parameters('MetricAlertsFileShares')[range(0, length(parameters('MetricAlertsFileShares')))[copyIndex()]].criteria.allOf]" @@ -10959,8 +10965,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11594559233220382616" + "version": "0.31.92.45157", + "templateHash": "16627790300726824635" } }, "parameters": { @@ -11197,8 +11203,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "8095446035196327417" + "version": "0.31.92.45157", + "templateHash": "17476159558740499985" } }, "parameters": { @@ -11547,8 +11553,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1467621426818181348" + "version": "0.31.92.45157", + "templateHash": "10992883760425799054" } }, "parameters": { @@ -11777,8 +11783,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11807894433946183941" + "version": "0.31.92.45157", + "templateHash": "6105069869291760049" } }, "parameters": { @@ -12104,8 +12110,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "4393845525828946838" + "version": "0.31.92.45157", + "templateHash": "16008288185953288251" } }, "parameters": { @@ -12214,8 +12220,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1467621426818181348" + "version": "0.31.92.45157", + "templateHash": "10992883760425799054" } }, "parameters": { @@ -12444,8 +12450,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11807894433946183941" + "version": "0.31.92.45157", + "templateHash": "6105069869291760049" } }, "parameters": { @@ -12789,8 +12795,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "4393845525828946838" + "version": "0.31.92.45157", + "templateHash": "16008288185953288251" } }, "parameters": { @@ -12899,8 +12905,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1467621426818181348" + "version": "0.31.92.45157", + "templateHash": "10992883760425799054" } }, "parameters": { @@ -13129,8 +13135,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11807894433946183941" + "version": "0.31.92.45157", + "templateHash": "6105069869291760049" } }, "parameters": { @@ -13498,8 +13504,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "11504384291380680725" + "version": "0.31.92.45157", + "templateHash": "2424728807337298433" } }, "parameters": { @@ -13653,8 +13659,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "2473787457312022626" + "version": "0.31.92.45157", + "templateHash": "13690135404308617503" } }, "parameters": { diff --git a/patterns/avd/templates/deploy.bicep b/patterns/avd/templates/deploy.bicep index ad259653c..cb0b12792 100644 --- a/patterns/avd/templates/deploy.bicep +++ b/patterns/avd/templates/deploy.bicep @@ -73,7 +73,7 @@ param ANFVolumeResourceIds array = [] param Tags object = {} var ActionGroupName = 'ag-avdmetrics-${Environment}-${Location}' -var AlertDescriptionHeader = 'Automated AVD Alert Deployment Solution (v2.1.5)\n' // DESCRIPTION HEADER AND VERSION <----------------------------- +var AlertDescriptionHeader = 'Automated AVD Alert Deployment Solution (v2.1.6)\n' // DESCRIPTION HEADER AND VERSION <----------------------------- var AutomationAccountName = 'aa-avdmetrics-${Environment}-${Location}-${AlertNamePrefix}' var CloudEnvironment = environment().name var ResourceGroupCreate = ResourceGroupStatus == 'New' ? true : false diff --git a/patterns/avd/templates/modules/anfMetric.bicep b/patterns/avd/templates/modules/anfMetric.bicep index d8bf47ec0..4321c130a 100644 --- a/patterns/avd/templates/modules/anfMetric.bicep +++ b/patterns/avd/templates/modules/anfMetric.bicep @@ -7,11 +7,15 @@ param ANFVolumeResourceID string param ActionGroupID string param Tags object -module metricAlerts_VirtualMachines '../carml/1.3.0/Microsoft.Insights/metricAlerts/deploy.bicep' = [for i in range(0, length(MetricAlertsANF)): { - name: 'c_${MetricAlertsANF[i].name}-${split(ANFVolumeResourceID, '/')[12]}-${Environment}' +// Help ensure entire deployment name is under 64 characters +var ANFVolumeResourceNameOrig = split(ANFVolumeResourceID, '/')[12] +var ANFVolumeResourceName = length(ANFVolumeResourceNameOrig) < 20 ? ANFVolumeResourceNameOrig : skip(ANFVolumeResourceNameOrig, length(ANFVolumeResourceNameOrig)-20) + +module metricAlerts_ANFVolumes '../carml/1.3.0/Microsoft.Insights/metricAlerts/deploy.bicep' = [for i in range(0, length(MetricAlertsANF)): { + name: 'c_${MetricAlertsANF[i].name}-${ANFVolumeResourceName}-${Environment}' params: { enableDefaultTelemetry: false - name: '${MetricAlertsANF[i].displayName}-${split(ANFVolumeResourceID, '/')[12]}-${Environment}' + name: '${MetricAlertsANF[i].displayName}-${ANFVolumeResourceName}-${Environment}' criterias: MetricAlertsANF[i].criteria.allOf location: 'global' alertDescription: MetricAlertsANF[i].description diff --git a/patterns/avd/templates/modules/fileservicsmetric.bicep b/patterns/avd/templates/modules/fileservicsmetric.bicep index 84919b60d..ab4d9d535 100644 --- a/patterns/avd/templates/modules/fileservicsmetric.bicep +++ b/patterns/avd/templates/modules/fileservicsmetric.bicep @@ -7,13 +7,17 @@ param MetricAlertsFileShares array param ActionGroupID string param Tags object +// Help ensure entire deployment name is under 64 characters +var StorAcctNameOrig = split(StorageAccountResourceID, '/')[8] +var StorAcctName = length(StorAcctNameOrig) < 20 ? StorAcctNameOrig : skip(StorAcctNameOrig, length(StorAcctNameOrig)-20) + var FileServicesResourceID = '${StorageAccountResourceID}/fileServices/default' module metricAlerts_FileServices '../carml/1.3.0/Microsoft.Insights/metricAlerts/deploy.bicep' = [for i in range(0, length(MetricAlertsFileShares)): { - name: 'c_${MetricAlertsFileShares[i].name}-${split(FileServicesResourceID, '/')[8]}-${Environment}' + name: 'c_${MetricAlertsFileShares[i].name}-${StorAcctName}-${Environment}' params: { enableDefaultTelemetry: false - name: '${MetricAlertsFileShares[i].displayName}-${split(FileServicesResourceID, '/')[8]}-${Environment}' + name: '${MetricAlertsFileShares[i].displayName}-${StorAcctName}-${Environment}' criterias: MetricAlertsFileShares[i].criteria.allOf location: 'global' alertDescription: MetricAlertsFileShares[i].description