Count the Azure Resources using the Cloud Custodian

Exporting the results into CSV format is huge.

policies:
- name: dnszone-identify-them-all
resource: azure.dnszone
comment: |
Find all DNS Zones in the subscription. This policy runs every
Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: keyvault-identify-them-all
resource: azure.keyvault
comment: |
Find all Key Vaults in the subscription. This policy runs every
Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: redis-identify-them-all
resource: azure.redis
comment: |
Find all redis in the subscription. This policy runs every
Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: resourcegroup-identify-them-all
resource: azure.redis
comment: |
Find all resource group in the subscription. This policy runs
every Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: sqldatabase-identify-them-all
resource: azure.sqldatabase
comment: |
Find all SQL Database in the subscription. This policy runs
every Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: sqlserver-identify-them-all
resource: azure.sqlserver
comment: |
Find all SQL Server in the subscription. This policy runs
every Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: storage-identify-them-all
resource: azure.storage
comment: |
Find all Storage in the subscription. This policy runs
every Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: containerregistry-identify-them-all
resource: azure.containerregistry
comment: |
Find all containerregistry in the subscription. This policy runs
every Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: webapp-identify-them-all
resource: azure.webapp
comment: |
Find all WebApp in the subscription. This policy runs
every Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}
policies:
- name: appserviceplan-identify-them-all
resource: azure.appserviceplan
comment: |
Find all App Service Plan in the subscription. This policy runs
every Sunday at 9:25AM UTC (CST time: 3:25AM).
mode:
schedule: 0 25 9 * * 0
type: azure-periodic
provision-options:
identity:
type: UserAssigned
id: exampleid
execution-options:
output_dir: azure://example.blob.abcd.windows.net/{account_id}

Over 18 years of experience in a wide variety of technical domains within information security including information assurance, compliance, and risk management.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Inspecting rogue PHP processes

Enterprise Low-code: Rapidity — Agility — Cost Efficiency

An open education platform: Alloverse’s journey towards 1.0

The Citizen Developer is Dead

CS371p Fall 2021: John Powers : Final Entry

De-forking a Puppet module

The Project Reunion features were initially slated for .NET 5, but they missed the cut. They’re

list.sort() vs. sorted(list)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aakif Shaikh, CISSP, CEH, CHFI, CISA, GWAPT

Aakif Shaikh, CISSP, CEH, CHFI, CISA, GWAPT

Over 18 years of experience in a wide variety of technical domains within information security including information assurance, compliance, and risk management.

More from Medium

Azure ExpressRoute Routing Optimization

Infrastructure as Code: Is it so hard?

FinOps best practices: How to find and cleanup orphaned and unused snapshots in MS Azure and…

Programmatic deployment of Azure Marketplace offers