Reporting on untagged resources

Update 4/7/2020: To align with best practices, I’m looking into the possibility of adding support for grabbing secret information from an Azure KeyVault as opposed to having it stored directly in the script.

Welcome to my first Azure post!  Within a few weeks at the new job, I was asked by management if it was possible to have a report generated on a routine schedule listing all resources in Azure currently untagged so they could be addressed accordingly.  The DevOps team at my current employer is charged with overseeing security and governance amongst other things, so this felt like a great opportunity to use PowerShell and Azure Automation.

Using Azure Automation, I set up a PowerShell runbook to retrieve the various subscriptions under the tenant, gather resources that aren’t tagged, and send an email via the Sendgrid service. Using source control allows us to keep the script easily up to date and publish as soon as changes are made.

I hope this helps anyone else who may be faced with a similar challenge.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.