- I am seeing a typo in the settings
wokspaceId: workspaceId
Could that be the issue? - workspaceId and workspaceKey are case-sensitive. So double check both to ensure that's not the issue.
Let me know the results and I can further investigate.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I found in documentation this example and I even hard coded the values so I don't have wrong something, but still getting this error:
link to doc: https://learn.microsoft.com/en-us/azure/azure-monitor/agents/resource-manager-agent?tabs=bicep
VM has reported a failure when processing extension 'Microsoft.Insights.LogAnalyticsAgent'. Error message: \"The configuration was not valid. Please validate the workspaceId is in the PublicSetting field, and the workspaceKey is in the PrivateSetting field. Both fields are case-sensitive. (MMAEXTENSION_ERROR_INVALIDCONFIG)
This is my code:
resource vmss 'Microsoft.Compute/virtualMachineScaleSets@2022-03-01' = {
name: vmssName
location: location
tags: tags
extensionProfile: {
extensions: [
{
name: 'DependencyAgentWindows'
properties: {
autoUpgradeMinorVersion: true
publisher: 'Microsoft.Azure.Monitoring.DependencyAgent'
type: 'DependencyAgentWindows'
typeHandlerVersion: '9.10'
}
}
{
name: 'Microsoft.Insights.LogAnalyticsAgent'
properties: {
autoUpgradeMinorVersion: true
publisher: 'Microsoft.EnterpriseCloud.Monitoring'
type: 'MicrosoftMonitoringAgent'
typeHandlerVersion: '1.0'
settings: {
wokspaceId: workspaceId // 625e7dc0-54c8-4f6e-ac94-9805cb4e5ee2
}
protectedSettings: {
workspaceKey: protectedSettings // PJWmnkRHFqfA03YwpVSCUh2ocmC/O34YZFwVSjjw93+ShyFxHl43JDSjqLn7FdfDCDFXVQ6JH8ZAM44YIDn60A==
}
}
}
]
}
}
}
}
Let me know the results and I can further investigate.