Table: azure_resource_group - Query Azure Resource Groups using SQL
Azure Resource Groups are essential components of Azure Resource Management, serving as logical containers for resources deployed within an Azure subscription. They provide a way to monitor, control access, provision and manage billing for collections of assets, which are required to run an application, or used by a department or a team. Azure Resource Groups offer a means to manage and organize resources based on lifecycles and application architecture, along with providing access control, consistency, and efficiency.
Table Usage Guide
The azure_resource_group
table provides insights into Resource Groups within Microsoft Azure. As a DevOps engineer, explore group-specific details through this table, including properties, location, and associated tags. Utilize it to manage and organize resources, control access, and manage billing for collections of assets used by applications, departments, or teams.
Examples
List of resource groups with their locations
Explore which Azure resource groups are located in specific regions to better manage and organize your resources. This is useful for understanding the geographical distribution of your resources for efficiency and cost-effectiveness.
select name, regionfrom azure_resource_group;
select name, regionfrom azure_resource_group;
List of resource groups without owner tag key
Explore which Azure resource groups are missing an 'owner' tag. This query assists in identifying and addressing gaps in resource ownership, aiding in resource management and accountability.
select name, tagsfrom azure_resource_groupwhere not tags :: JSONB ? 'owner';
select name, tagsfrom azure_resource_groupwhere json_extract(tags, '$.owner') is null;
Schema for azure_resource_group
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cloud_environment | text | The Azure Cloud Environment. | |
id | text | Contains ID to identify a resource group uniquely. | |
managed_by | text | Contains ID of the resource that manages this resource group. | |
name | text | = | The friendly name that identifies the resource group. |
provisioning_state | text | Current state of the resource group. | |
region | text | The Azure region/location in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
subscription_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Azure Subscription ID in which the resource is located. |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
type | text | Type of the resource group. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- azure
You can pass the configuration to the command with the --config
argument:
steampipe_export_azure --config '<your_config>' azure_resource_group