Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.45 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.45 KB

Azure Resource Graph quickstart queries

This repo contains all currently available Azure Resource Graph queries contributed by ShareGate and the community.

About source code in this repository

  • Query code goes under the the right queries folder.
  • Create a folder for the service it concerns (i.g.: storageAccounts, cdn, virtualNetworks).
  • Create a folder for your query (all lower case with dases instead of spaces).
  • The query goes in a query.txt file.
  • Create a README.md file to provide a title/description of what the query does.
  • (On Windows) Run Test-ResourceGraphQueries.ps1 to test the queries before creating a PR.
  • You can place your query code in this repository by creating a PR.

Requirements for CI of queries

  • PowerShell v5+
  • Azure CLI
  • Azure CLI Resource Graph extension (resource-graph)

Setup for CI

  • Install Azure CLI
  • Install Azure Resource Graph extension (az extension add --name resource-graph)
  • az login

Execute CI tests

In a PowerShell session, run .\Test-ResourceGraphQueries.ps1 for all queries

or .\Test-ResourceGraphQueries.ps1 -FolderToTest 'queries\generic\count-azure-resources' for one in particular

License

Copyright © 2019, Groupe Sharegate inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE.