Skip to content

Instantly share code, notes, and snippets.

@codingoutloud
Last active July 20, 2023 10:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingoutloud/bca4ebf1bf28313acce29e3c84934108 to your computer and use it in GitHub Desktop.
Save codingoutloud/bca4ebf1bf28313acce29e3c84934108 to your computer and use it in GitHub Desktop.
Using Azure CLI 2, show all the resources in a resource group
#/bin/bash
if [ $1 ]
then
echo "Resources in Azure Resource Group $1"
az resource list --query "[?resourceGroup=='$1'].{ name: name, flavor: kind, resourceType: type, region: location }" --output table
else
echo "usage: $0 [name-of-azure-resource-group]"
fi
@alexandair
Copy link

Haven't you hardcoded 'billtestmar2'?

@codingoutloud
Copy link
Author

@alexandair oops! I did - fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment