From fe50e86a54b420fed8269e4cacaff6883c94d81c Mon Sep 17 00:00:00 2001 From: lulight <69841770+LuBu0505@users.noreply.github.com> Date: Wed, 17 Sep 2025 20:33:11 +0800 Subject: [PATCH] Update enforceAzureMonitoredKeyVault.json need add the "#" for the $schema url. if no #, will met Location / scope error. the error message as below: { "code": "InvalidTemplate", "message": "Deployment template validation failed: 'The template resource 'Enforce-Monitoring-KeyVault-Assignment' at line '139' and column '9' is not valid: The language expression property 'location' doesn't exist, available properties are 'name, tags, properties'.. Please see https://aka.ms/arm-functions for usage details.'." } { "code": "InvalidPolicyUri", "message": "The policy request scope '/subscriptions/xxxxxxx-xxx-xxx-xxxxxx/resourcegroups/xxxxx_rg' should be '/', '/subscriptions/id' or '/providers/Microsoft.Management/managementGroups/id'." } --- .../enforceAzureMonitoredKeyVault.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/policy-enforce-keyvault-monitoring/enforceAzureMonitoredKeyVault.json b/templates/policy-enforce-keyvault-monitoring/enforceAzureMonitoredKeyVault.json index af00637..dc24ce9 100644 --- a/templates/policy-enforce-keyvault-monitoring/enforceAzureMonitoredKeyVault.json +++ b/templates/policy-enforce-keyvault-monitoring/enforceAzureMonitoredKeyVault.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json", + "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "logAnalytics": { @@ -167,4 +167,4 @@ } } ] -} \ No newline at end of file +}