turbot / steampipe-plugin-azure

Use SQL to instantly query Azure resources across regions and subscriptions. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/azure
Apache License 2.0
34 stars 15 forks source link

Azure Standard Front Door resource details not listed in Steampipe Azure plugin #764

Closed Priyanka-Chatterjee-2000 closed 3 weeks ago

Priyanka-Chatterjee-2000 commented 1 month ago

Description: I am experiencing an issue with the Steampipe Azure plugin where Azure Front Door resources are not being listed as expected. Despite having created an Azure Front Door resource, the azure_frontdoor table returns an empty result set.

Steps to Reproduce:

Create an Azure Front Door resource using the Azure CLI or Azure Portal. Verify the creation of the resource using az afd profile list:

az afd profile list
[
  {
    "extendedProperties": {},
    "frontDoorId": "b.............................................",
    "id": "/subscriptions/d46d..................................../resourcegroups/demo/providers/Microsoft.Cdn/profiles/test-123",
    "kind": "frontdoor",
    "location": "Global",
    "name": "test-123",
    "originResponseTimeoutSeconds": 60,
    "provisioningState": "Succeeded",
    "resourceGroup": "demo",
    "resourceState": "Active",
    "sku": {
      "name": "Standard_AzureFrontDoor"
    },
    "tags": {},
    "type": "Microsoft.Cdn/profiles"
  }
]

Attempt to list the Azure Front Door resources using Steampipe:

select * from azure_frontdoor;

Expected Behavior: The Azure Front Door resource should be listed in the query result.

Actual Behavior: The query returns an empty result set.

Additional Information:

ParthaI commented 1 month ago

Hi @Priyanka-Chatterjee-2000, The table azure_frontdoor is returning the data as expected.

> select * from azure_frontdoor;
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------------+-----------------------------+---------------+------------>
| name            | id                                                                                                                                        | provisioning_state | type                         | cname                       | enabled_state | friendly_na>
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------------+-----------------------------+---------------+------------>
| turbottest76782 | /subscriptions/************************************/resourcegroups/turbottest76782/providers/Microsoft.Network/frontdoors/turbottest76782 | Succeeded          | Microsoft.Network/frontdoors | turbottest76782.azurefd.net | Enabled       |            >
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------------+-----------------------------+---------------+------------>

The command az afd profile list stands for the resource Front Door and CDN profiles. Currently, the table returns the data for Azure CDN Standard from Microsoft (classic) Not the standard one.

Screenshot 2024-06-03 at 10 22 48 PM

Please update the issue as per your requirements.

Thanks!

Priyanka-Chatterjee-2000 commented 1 month ago

@ParthaI need the details of the standard frontdoor but in table azure_frontdoor we get only classic ones details. Shall we have a new table to query standard frontdoor information?

ParthaI commented 3 weeks ago

@Priyanka-Chatterjee-2000, I believe this will be a separate table. Terraform treats it as a separate resource:

Also, there are two separate CLI commands to list the resources.

Thanks!

ParthaI commented 3 weeks ago

Hey @Priyanka-Chatterjee-2000, I have added support for the new table azure_cdn_frontdoor_profile in this PR.

Please give it a shot and let me know if it fulfils the requirements or if you need to ass any other properties to this table.

Thanks!