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

Add table azure_data_protection_backup_vault Closes #773 #776

Closed ParthaI closed 3 weeks ago

ParthaI commented 3 weeks ago

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_data_protection_backup_vault [] PRETEST: tests/azure_data_protection_backup_vault TEST: tests/azure_data_protection_backup_vault Running terraform data.azurerm_client_config.current: Reading... data.azurerm_client_config.current: Read complete after 0s [id=Y2xpZW50Q29uZmlncy9jbGllbnRJZD0wNGIwNzc5NS04ZGRiLTQ2MWEtYmJlZS0wMmY5ZTFiZjdiNDY7b2JqZWN0SWQ9MDZmZDQ2YjAtYTg2Ny00OWExLWE0ZjEtZjc3Njg0NjVjYWJhO3N1YnNjcmlwdGlvbklkPWQ0NmQ3NDE2LWY5NWYtNDc3MS1iYmI1LTUyOWQ0Yzc2NjU5Yzt0ZW5hbnRJZD1jZGZmZDcwOC03ZGEwLTRjZWEtYWJlYi0wYTRjMzM0ZDdmNjQ=] data.null_data_source.resource: Reading... data.null_data_source.resource: Read complete after 0s [id=static] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # azurerm_data_protection_backup_vault.named_test_resource will be created + resource "azurerm_data_protection_backup_vault" "named_test_resource" { + datastore_type = "VaultStore" + id = (known after apply) + location = "eastus" + name = "turbottest9663" + redundancy = "LocallyRedundant" + resource_group_name = "turbottest9663" + retention_duration_in_days = 14 + soft_delete = "On" } # azurerm_resource_group.named_test_resource will be created + resource "azurerm_resource_group" "named_test_resource" { + id = (known after apply) + location = "eastus" + name = "turbottest9663" } Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs: + id = (known after apply) + resource_aka = (known after apply) + resource_aka_lower = (known after apply) + resource_name = "turbottest9663" azurerm_resource_group.named_test_resource: Creating... azurerm_resource_group.named_test_resource: Still creating... [10s elapsed] azurerm_resource_group.named_test_resource: Creation complete after 12s [id=/subscriptions/****-****-****-****-************/resourceGroups/turbottest9663] azurerm_data_protection_backup_vault.named_test_resource: Creating... azurerm_data_protection_backup_vault.named_test_resource: Still creating... [10s elapsed] azurerm_data_protection_backup_vault.named_test_resource: Creation complete after 18s [id=/subscriptions/****-****-****-****-************/resourceGroups/turbottest9663/providers/Microsoft.DataProtection/backupVaults/turbottest9663] Warning: Deprecated with data.null_data_source.resource, on variables.tf line 29, in data "null_data_source" "resource": 29: data "null_data_source" "resource" { The null_data_source was historically used to construct intermediate values to re-use elsewhere in configuration, the same can now be achieved using locals or the terraform_data resource type in Terraform 1.4 and later. (and one more similar warning elsewhere) Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Outputs: id = "/subscriptions/****-****-****-****-************/resourceGroups/turbottest9663/providers/Microsoft.DataProtection/backupVaults/turbottest9663" resource_aka = "azure:///subscriptions/****-****-****-****-************/resourceGroups/turbottest9663/providers/Microsoft.DataProtection/backupVaults/turbottest9663" resource_aka_lower = "azure:///subscriptions/****-****-****-****-************/resourcegroups/turbottest9663/providers/microsoft.dataprotection/backupvaults/turbottest9663" resource_name = "turbottest9663" Running SQL query: test-list-query.sql Time: 2.2s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0. Scans: 1) azure_data_protection_backup_vault.azure: Time: 2.0s. Fetched: 1. Hydrates: 0. Quals: name=turbottest9663. [ { "id": "/subscriptions/****-****-****-****-************/resourceGroups/turbottest9663/providers/Microsoft.DataProtection/backupVaults/turbottest9663", "name": "turbottest9663" } ] ✔ PASSED Running SQL query: test-not-found-query.sql Time: 1.9s. Rows returned: 0. [] ✔ PASSED Running SQL query: test-turbot-query.sql Time: 2.4s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0. Scans: 1) azure_data_protection_backup_vault.azure: Time: 2.1s. Fetched: 1. Hydrates: 0. Quals: name=turbottest9663, resource_group=turbottest9663. [ { "akas": [ "azure:///subscriptions/****-****-****-****-************/resourceGroups/turbottest9663/providers/Microsoft.DataProtection/backupVaults/turbottest9663", "azure:///subscriptions/****-****-****-****-************/resourcegroups/turbottest9663/providers/microsoft.dataprotection/backupvaults/turbottest9663" ], "name": "turbottest9663", "title": "turbottest9663" } ] ✔ PASSED POSTTEST: tests/azure_data_protection_backup_vault TEARDOWN: tests/azure_data_protection_backup_vault SUMMARY: 1/1 passed. ```

Example query results

Results ``` > select * from azure_data_protection_backup_vault +----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------+----------+-------------------> | name | id | type | location | provisioning_state> +----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------+----------+-------------------> | turbottest8195 | /subscriptions/****-****-****-****-************/resourceGroups/turbottest8195/providers/Microsoft.DataProtection/backupVaults/turbottest8195 | Microsoft.DataProtection/backupVaults | eastus | Succeeded > +----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------+----------+-------------------> Time: 3.4s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 2. ```