Skip to content

feat: add azure_resource_graph table#988

Open
jmapro wants to merge 1 commit into
turbot:mainfrom
jmapro:feat/add-azureresourcegraph-table
Open

feat: add azure_resource_graph table#988
jmapro wants to merge 1 commit into
turbot:mainfrom
jmapro:feat/add-azureresourcegraph-table

Conversation

@jmapro
Copy link
Copy Markdown

@jmapro jmapro commented Apr 23, 2026

Integration test logs

Logs
No env file present for the current environment:  staging
 Falling back to .env config
No env file present for the current environment:  staging
customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined

SETUP: tests/azure_resource_graph []

PRETEST: tests/azure_resource_graph

TEST: tests/azure_resource_graph
Running terraform
data.azuread_client_config.current: Reading...
data.azuread_client_config.current: Read complete after 0s [id=f87a*****-***-4bbd-*****-*******-*****-8ddb-461a-bbee-02f*********-34bdfe6d-*****-4b30-ac50-*******]
data.azurerm_subscription.current: Reading...
data.azurerm_subscription.current: Read complete after 1s [id=/subscriptions/20da****-****-****-****-*****2a80d]

Changes to Outputs:
  + current_subscription_display_name = "Microsoft Azure Sponsorship (SPAE2)"
  + subscription_id                   = "20da****-****-****-****-*****2a80d"

You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

current_subscription_display_name = "Microsoft Azure Sponsorship (SPAE2)"
subscription_id = "220da****-****-****-****-*****2a80d"

Running SQL query: test-columns-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/20da****-****-****-****-*****2a80d"
    ],
    "query": "ResourceContainers | where type == \"microsoft.resources/subscriptions\" | limit 1",
    "region": "",
    "resource_group": null,
    "title": "Microsoft Azure Sponsorship (SPAE2)"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/20da****-****-****-****-*****2a80d",
    "name": "Microsoft Azure Sponsorship (SPAE2)",
    "query": "ResourceContainers | where type == \"microsoft.resources/subscriptions\" | limit 1",
    "type": "microsoft.resources/subscriptions"
  }
]
✔ PASSED

Running SQL query: test-not-found-query.sql
[]
✔ PASSED

POSTTEST: tests/azure_resource_graph

TEARDOWN: tests/azure_resource_graph

SUMMARY:

1/1 passed.

Example query results

Results
❯ steampipe query "select
  name,
  properties ->> 'patchName' as patch_name,
  properties ->> 'version' as version,
  properties ->> 'kbId' as kb_id,
  properties ->> 'classifications' as classifications,
  properties ->> 'rebootBehavior' as reboot_behavior
from
  azure_resource_graph
where
  query = 'patchassessmentresources | where type == \"microsoft.compute/virtualmachines/patchassessmentresults/softwarepatches\"'
LIMIT 5;"
+------+----------------+-------------------------+--------+-----------------+-----------------+
| name | patch_name     | version                 | kb_id  | classifications | reboot_behavior |
+------+----------------+-------------------------+--------+-----------------+-----------------+
| 1    | dpkg           | 1.22.6ubuntu6.5         | <null> | ["Security"]    | <null>          |
| 100  | python3-jwt    | 2.7.0-1ubuntu0.1        | <null> | ["Security"]    | <null>          |
| 102  | cpp-13         | 13.3.0-6ubuntu2~24.04.1 | <null> | ["Security"]    | <null>          |
| 101  | vim-runtime    | 2:9.1.0016-1ubuntu7.11  | <null> | ["Security"]    | <null>          |
| 10   | libpam-runtime | 1.5.3-5ubuntu5.5        | <null> | ["Security"]    | <null>          |
+------+----------------+-------------------------+--------+-----------------+-----------------+

Closes #987

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_resource_graph

1 participant