Created
March 14, 2022 14:19
-
-
Save ehrnst/4fd80aa4153e4f3b000033a9360437ef to your computer and use it in GitHub Desktop.
Azure resource graph resource changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get latest resource changes based on resource group tag | |
resourcechanges | |
| join kind= inner ( | |
resourcecontainers | |
| where type =~ 'microsoft.resources/subscriptions/resourcegroups' | |
| where isnotempty(tags) | |
| where tags['key'] =~ 'value' | |
| project subscriptionId, resourceGroup) | |
on subscriptionId, resourceGroup | |
| extend changeTime = todatetime(properties.changeAttributes.timestamp), | |
changedResourceId = tostring(properties.targetResourceId), | |
changes = tostring(properties.changes), | |
changeType= tostring(properties.changeType) | |
| project-away subscriptionId1, resourceGroup1 | |
| project changeTime, changeType, changedResourceId, changes | |
| order by changeTime desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment