Table: azure_compute_virtual_machine_size - Query Azure Virtual Machine Sizes using SQL
Azure virtual machine sizes determine the computing resources, such as memory, CPU cores, and disk capacity, available to your virtual machines (VMs). The azure_compute_virtual_machine_size
table in Steampipe allows you to query and explore the different virtual machine sizes available in Azure, enabling you to compare memory, disk sizes, and other attributes to choose the right VM for your workload.
Table Usage Guide
The azure_compute_virtual_machine_size
table is useful for cloud architects, administrators, and DevOps engineers who need insights into the available VM sizes in Azure. You can query attributes like the number of cores, memory, and disk sizes to make informed decisions about the resources required for your virtual machines.
Examples
Basic VM size information
Retrieve basic information about the virtual machine sizes, including name, region, and number of cores.
select name, region, number_of_cores, memory_in_mbfrom azure_compute_virtual_machine_size;
select name, region, number_of_cores, memory_in_mbfrom azure_compute_virtual_machine_size;
List VM sizes with high memory
Identify VM sizes that have more than a specified amount of memory (e.g., 32 GB).
select name, memory_in_mb, number_of_coresfrom azure_compute_virtual_machine_sizewhere memory_in_mb > 32768;
select name, memory_in_mb, number_of_coresfrom azure_compute_virtual_machine_sizewhere memory_in_mb > 32768;
List VM sizes with large OS disk size
Fetch VM sizes that support large OS disk sizes (e.g., over 500 GB).
select name, os_disk_size_in_mb, max_data_disk_countfrom azure_compute_virtual_machine_sizewhere os_disk_size_in_mb > 512000;
select name, os_disk_size_in_mb, max_data_disk_countfrom azure_compute_virtual_machine_sizewhere os_disk_size_in_mb > 512000;
List VM sizes by core count
Retrieve a list of VM sizes based on the number of cores available.
select name, number_of_cores, regionfrom azure_compute_virtual_machine_sizewhere number_of_cores >= 8;
select name, number_of_cores, regionfrom azure_compute_virtual_machine_sizewhere number_of_cores >= 8;
List VM sizes with a specific data disk count
Identify VM sizes that support a certain number of data disks.
select name, max_data_disk_count, resource_disk_size_in_mbfrom azure_compute_virtual_machine_sizewhere max_data_disk_count >= 8;
select name, max_data_disk_count, resource_disk_size_in_mbfrom azure_compute_virtual_machine_sizewhere max_data_disk_count >= 8;
Schema for azure_compute_virtual_machine_size
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
cloud_environment | text | The Azure Cloud Environment. | |
max_data_disk_count | bigint | The maximum number of data disks that can be attached to the virtual machine size. | |
memory_in_mb | bigint | The amount of memory, in MB, supported by the virtual machine size. | |
name | text | The name of the virtual machine size. | |
number_of_cores | bigint | The number of cores supported by the virtual machine size. | |
os_disk_size_in_mb | bigint | The OS disk size, in MB, allowed by the virtual machine size. | |
region | text | The Azure region/location in which the resource is located. | |
resource_disk_size_in_mb | bigint | The resource disk size, in MB, allowed by the virtual machine size. | |
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. |
title | text | Title of the resource. |
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_compute_virtual_machine_size