DEV Community

Alexey Melezhik
Alexey Melezhik

Posted on

1

Sparrow plugin to search / check resources in Azure resource group

Ever thought how to check if some resources exists in Azure resource group? This tasks is very common for those who deal with an Azure infrastructure automation.

Here is azure-resource-group plugin for the rescue:

Load resource list


# list all databases in RG_001102:

my %state = task-run "get resources list", "azure-resource-list", %(
  group     => "RG_001102"
  pattern  => "'servers/databases'"
);

for %state<list> -> $d {
  say $d.perl;
}
Enter fullscreen mode Exit fullscreen mode

Validate if specific resources exist in a resource group


# Check if there is any storage account in RG_001102:

task-run "get resources list", "azure-resource-list", %(
  group     => "RG_001102"
  list => (
    "Microsoft.Storage/storageAccounts"
  )         
);
Enter fullscreen mode Exit fullscreen mode

That is it. See updates on Sparrowhub.io

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay