I am trying to set inbuilt policy definition to send logs of storage account to Log analytics workspace using Azure Portal.
Note: I am using personal azure account subscription with Free Trail.
1st Step: Configure diagnostic settings for storage accounts to Log Analytics workspace
2nd Step: Clicked on Assign --> Scope set to Resource Group then Log Analytics resource selected in Parameter tab - > Review +Create
3rd Step: Created Policy Assignment Success, Role Assignments creation succeeded in Azure Portal
4th Step: After waiting for 15 mins, Storage Account --> Diagnostic settings (preview) -- > I don't see Diagnostic Settings are enabled in Storage Account.
I can see Non Compliance Issue in policy. Below is details for same.
What I am missing?
Update:
The issue must be for existing storage accounts only if you are not selecting the create the remediation task
as shown below:
If the above is selected then your all the storage accounts present in subscription will become compliant (I have tested it for a resource group and not subscription).
Note: If this is not selected then existing storage account will error out with the same error you are getting, but the new ones which will be created will get compliant .
Steps to follow if the Policy is applied and remediation is not selected :
Click on Create remediation task from the compliance page and it will automatically populate the non-compliant storage accounts .
Click on remediate. It will submit the process and after the remediate process succeeds , it will take around 15 mins for all non-compliant storage account to become compliant.