Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table azure_compute_virtual_machine_size Closes #826 #841

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Sep 20, 2024

Integration test logs

Logs
N/A

Example query results

Results
> select * from azure_compute_virtual_machine_size
+---------------------------+-----------------+--------------------+--------------------------+--------------+---------------------+---------------------------+--------------------+-------------------+--------------------------------------+--------------------+----------------------------------------------------->
| name                      | number_of_cores | os_disk_size_in_mb | resource_disk_size_in_mb | memory_in_mb | max_data_disk_count | title                     | region             | cloud_environment | subscription_id                      | sp_connection_name | sp_ctx                                              >
+---------------------------+-----------------+--------------------+--------------------------+--------------+---------------------+---------------------------+--------------------+-------------------+--------------------------------------+--------------------+----------------------------------------------------->
| Standard_E64_v4           | 64              | 1047552            | 0                        | 516096       | 32                  | Standard_E64_v4           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E64s_v4          | 64              | 1047552            | 0                        | 516096       | 32                  | Standard_E64s_v4          | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E2_v5            | 2               | 1047552            | 0                        | 16384        | 4                   | Standard_E2_v5            | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E4_v5            | 4               | 1047552            | 0                        | 32768        | 8                   | Standard_E4_v5            | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E4-2s_v3         | 4               | 1047552            | 65536                    | 32768        | 8                   | Standard_E4-2s_v3         | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E8_v5            | 8               | 1047552            | 0                        | 65536        | 16                  | Standard_E8_v5            | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E4s_v3           | 4               | 1047552            | 65536                    | 32768        | 8                   | Standard_E4s_v3           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E16_v5           | 16              | 1047552            | 0                        | 131072       | 32                  | Standard_E16_v5           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E20_v5           | 20              | 1047552            | 0                        | 163840       | 32                  | Standard_E20_v5           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E32_v5           | 32              | 1047552            | 0                        | 262144       | 32                  | Standard_E32_v5           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E48_v5           | 48              | 1047552            | 0                        | 393216       | 32                  | Standard_E48_v5           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E64_v5           | 64              | 1047552            | 0                        | 524288       | 32                  | Standard_E64_v5           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E96_v5           | 96              | 1047552            | 0                        | 688128       | 32                  | Standard_E96_v5           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_A8m_v2           | 8               | 1047552            | 81920                    | 65536        | 16                  | Standard_A8m_v2           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E104i_v5         | 104             | 1047552            | 0                        | 688128       | 64                  | Standard_E104i_v5         | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_D64_v3           | 64              | 1047552            | 1638400                  | 262144       | 32                  | Standard_D64_v3           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E4-2ds_v4        | 4               | 1047552            | 153600                   | 32768        | 8                   | Standard_E4-2ds_v4        | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_F2               | 2               | 1047552            | 32768                    | 4096         | 8                   | Standard_F2               | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_L80s_v2          | 80              | 1047552            | 819200                   | 655360       | 32                  | Standard_L80s_v2          | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_F8               | 8               | 1047552            | 131072                   | 16384        | 32                  | Standard_F8               | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_A0               | 1               | 1047552            | 20480                    | 768          | 1                   | Standard_A0               | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>
| Standard_E32_v3           | 32              | 1047552            | 819200                   | 262144       | 32                  | Standard_E32_v3           | eastus2            | AzurePublicCloud  | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | azure              | {"connection_name":"azure","steampipe":{"sdk_version>

@ParthaI ParthaI self-assigned this Sep 20, 2024
@ParthaI ParthaI linked an issue Sep 20, 2024 that may be closed by this pull request
Comment on lines +114 to +116
if strings.Contains(strings.ToLower(err.Error()), "no registered resource provider found for location") {
plugin.Logger(ctx).Error("azure_compute_virtual_machine_size.listComputeVirtualMachineSizes", "no registered resource provider found", err.Error())
return nil, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParthaI why are we handling this error?

When does the API return this error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@misraved, In Azure, resource providers are services that allow you to interact with resources (like virtual machines). For Virtual Machines, the relevant resource provider is Microsoft.Compute. If this provider is not registered, or if it's not available in the specified region, you might encounter this error.

You can use the command (az provider show --namespace Microsoft.Compute) to check the availability of the service in the specified location.

Look for the locations/vmSizes resource type in the command result to verify its availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table azure_virtual_machine_size
2 participants