You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am note sure if this is a tooling issue or schema validation issue, but when I use the managementGroup() function in a ARM template I get the following message in VS Code
I am note sure if this is a tooling issue or schema validation issue, but when I use the managementGroup() function in a ARM template I get the following message in VS Code
Template validation failed: The template resource XXXX. The template function 'managementGroup' is not valid. Please see https://aka.ms/arm-template-expressions for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.
I am specifically using managementGroup().name. The template does deploy correctly.
Resource snippet -
{
"name": "[substring(replace(guid(format('Security Center (MG {0})', managementGroup().name)), '-', ''), 0, 24)]",
"type": "Microsoft.Authorization/policyAssignments",
"apiVersion": "2021-06-01",
"location": "[parameters('location')]",
"scope": "[tenantResourceId('Microsoft.Management/managementGroups', managementGroup().name)]",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"displayName": "[format('Security Center (MG {0})', managementGroup().name)]",
"description": "Applies Security Center Settings to an Azure Subscription.",
"policyDefinitionId": "[extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', managementGroup().name), 'Microsoft.Authorization/policySetDefinitions', 'securitycenter-deploy-initiative')]",
"parameters": {
"autoProvisioningSetting": {
"value": "[parameters('autoProvisioningSetting')]"
},
"logAnalytics": {
"value": "[concat('/subscriptions/', parameters('logAnalyticsSubscription'), '/resourceGroups/', parameters('logAnalyticsResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', parameters('logAnalyticsWorkspace'))]"
}
}
}
The text was updated successfully, but these errors were encountered: