Keep Sub Clean
Summary
In this session, Frank is starting a new project to Automatically delete “expired” resources inside our Azure Subscription. First things to do is to get familiar with the Kusto Query Language (KQL)…
Replay
Timestamps
- 00:00:01 - Bonjour, Hi!
- 00:01:53 - Share some news
- 00:03:33 - Explain the project.
- 00:16:00 - Explore the Azure Queries
- 01:03:57 - Keyboard talk ;p
- 01:07:16 - Debugging Azure Graph Query
- 01:52:49 - Recap, what’s next
Goals
- List expired resources
- delete expired resources
- Sent notification with list of expired resources
- capture any errors that might happen
New Followers
New Subscribers
Streams Notes/ Snipets/ Shared urls
-
az graph query -q ‘where tostring(tags.displayName) matches regex “^hack” project name, type limit 5’ -
az graph query -q ‘where tostring(tags.expireOn) != “” project name, type, expireOn=tostring(tags.expireOn) limit 5’
References
-
GitHub Project: https://github.com/FBoucher/AzurePowerTools
-
https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types/datetime