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
35 stars 16 forks source link

Add column authorization_rules in the table azure_servicebus_namespace Closes #716 #719

Closed ParthaI closed 5 months ago

ParthaI commented 6 months 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_servicebus_namespace [] PRETEST: tests/azure_servicebus_namespace TEST: tests/azure_servicebus_namespace 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_resource_group.named_test_resource will be created + resource "azurerm_resource_group" "named_test_resource" { + id = (known after apply) + location = "eastus" + name = "turbottest31495" } # azurerm_servicebus_namespace.named_test_resource will be created + resource "azurerm_servicebus_namespace" "named_test_resource" { + capacity = 0 + default_primary_connection_string = (sensitive value) + default_primary_key = (sensitive value) + default_secondary_connection_string = (sensitive value) + default_secondary_key = (sensitive value) + endpoint = (known after apply) + id = (known after apply) + local_auth_enabled = true + location = "eastus" + minimum_tls_version = (known after apply) + name = "turbottest31495" + public_network_access_enabled = true + resource_group_name = "turbottest31495" + sku = "Basic" + tags = { + "name" = "turbottest31495" } } Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs: + location = "eastus" + resource_aka = (known after apply) + resource_aka_lower = (known after apply) + resource_id = (known after apply) + resource_name = "turbottest31495" + subscription_id = "3510ae4d-530b-497d-8f30-53b9616fc6c1" azurerm_resource_group.named_test_resource: Creating... azurerm_resource_group.named_test_resource: Creation complete after 3s [id=/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495] azurerm_servicebus_namespace.named_test_resource: Creating... azurerm_servicebus_namespace.named_test_resource: Still creating... [10s elapsed] azurerm_servicebus_namespace.named_test_resource: Still creating... [20s elapsed] azurerm_servicebus_namespace.named_test_resource: Still creating... [30s elapsed] azurerm_servicebus_namespace.named_test_resource: Still creating... [40s elapsed] azurerm_servicebus_namespace.named_test_resource: Still creating... [50s elapsed] azurerm_servicebus_namespace.named_test_resource: Still creating... [1m0s elapsed] azurerm_servicebus_namespace.named_test_resource: Still creating... [1m10s elapsed] azurerm_servicebus_namespace.named_test_resource: Creation complete after 1m11s [id=/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495/providers/Microsoft.ServiceBus/namespaces/turbottest31495] Warning: Deprecated with data.null_data_source.resource, on variables.tf line 28, in data "null_data_source" "resource": 28: 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: location = "eastus" resource_aka = "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495/providers/Microsoft.ServiceBus/namespaces/turbottest31495" resource_aka_lower = "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourcegroups/turbottest31495/providers/microsoft.servicebus/namespaces/turbottest31495" resource_id = "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495/providers/Microsoft.ServiceBus/namespaces/turbottest31495" resource_name = "turbottest31495" subscription_id = "3510ae4d-530b-497d-8f30-53b9616fc6c1" Running SQL query: test-get-query.sql Warning: terminal options has been deprecated and will be removed in a future version of Steampipe. These can now be set in a steampipe workspace. (/Users/parthas/.steampipe/config/default.spc:34,20-42,2) [ { "encryption": null, "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495/providers/Microsoft.ServiceBus/namespaces/turbottest31495", "name": "turbottest31495", "network_rule_set": { "properties": { "defaultAction": "Allow", "ipRules": [], "publicNetworkAccess": "Enabled", "trustedServiceAccessEnabled": false, "virtualNetworkRules": [] } }, "provisioning_state": "Succeeded", "servicebus_endpoint": "https://turbottest31495.servicebus.windows.net:443/", "sku_name": "Basic", "sku_tier": "Basic", "type": "Microsoft.ServiceBus/Namespaces", "zone_redundant": false } ] ✔ PASSED Running SQL query: test-list-query.sql Warning: terminal options has been deprecated and will be removed in a future version of Steampipe. These can now be set in a steampipe workspace. (/Users/parthas/.steampipe/config/default.spc:34,20-42,2) [ { "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495/providers/Microsoft.ServiceBus/namespaces/turbottest31495", "name": "turbottest31495" } ] ✔ PASSED Running SQL query: test-not-found-query.sql Warning: terminal options has been deprecated and will be removed in a future version of Steampipe. These can now be set in a steampipe workspace. (/Users/parthas/.steampipe/config/default.spc:34,20-42,2) [] ✔ PASSED Running SQL query: test-turbot-query.sql Warning: terminal options has been deprecated and will be removed in a future version of Steampipe. These can now be set in a steampipe workspace. (/Users/parthas/.steampipe/config/default.spc:34,20-42,2) [ { "akas": [ "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495/providers/Microsoft.ServiceBus/namespaces/turbottest31495", "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourcegroups/turbottest31495/providers/microsoft.servicebus/namespaces/turbottest31495" ], "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/turbottest31495/providers/Microsoft.ServiceBus/namespaces/turbottest31495", "name": "turbottest31495", "region": "eastus", "resource_group": "turbottest31495", "subscription_id": "3510ae4d-530b-497d-8f30-53b9616fc6c1", "tags": { "name": "turbottest31495" }, "title": "turbottest31495" } ] ✔ PASSED TEARDOWN: tests/azure_servicebus_namespace SUMMARY: 1/1 passed. ```

Example query results

Results ``` > select name, authorization_rules from azure_servicebus_namespace [ { "authorization_rules": [ { "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourcegroups/turbot_rg/providers/Microsoft.ServiceBus/namespaces/test43/authorizationrules/RootManageSharedAccessKey", "name": "RootManageSharedAccessKey", "properties": { "rights": [ "Listen", "Manage", "Send" ] }, "type": "Microsoft.ServiceBus/Namespaces/AuthorizationRules" }, { "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourcegroups/turbot_rg/providers/Microsoft.ServiceBus/namespaces/test43/authorizationrules/test43rule", "name": "test43rule", "properties": { "rights": [ "Listen", "Send" ] }, "type": "Microsoft.ServiceBus/Namespaces/AuthorizationRules" } ], "name": "test43" } ] ```