issue with built-in Azure Policy "Configure Azure Activity logs to stream to specified Log Analytics workspace"

AdamBudzinskiAZA-0329 91 Reputation points
2023-12-14T15:14:34.7233333+00:00

hi,

trying to deploy the policy Configure Azure Activity logs to stream to specified Log Analytics workspace

https://www.azadvertizer.net/azpolicyadvertizer/2465583e-4e78-4c15-b6be-a36cbc7c8b0f.html

Altough, the parametree is configured to use strongType omsWorkspace I'm not getting the workspace selector like I'm used to in other policies: User's image

As someone mentioned here https://techcommunity.microsoft.com/t5/azure/policy-assignment-to-enable-activity-log-on-subscription/m-p/2471006 changing the strongType from omsWorkspace to Microsoft.OperationalInsights/workspaces would solve the issue, however what I don't understand is that I'm using omsWorkspace as strongType in a custom policy and this works just fine :

User's image

I've followed https://video2.skills-academy.com/en-us/azure/governance/policy/concepts/definition-structure#strongtype to determine supported resource types and I can't see omWorkspace just:

ProviderNamespace : Microsoft.OperationalInsights

RegistrationState : Registered

ResourceTypes : {workspaces, querypacks, locations, locations/operationStatuses...}

Locations : {East US, West Europe, Southeast Asia, Australia Southeast...}

So, two questions. Does it have to change if yes, can the built-in policy by corrected ?! And, second what is this working for my other custom policy ?!

THANK YOU!

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
872 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.