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

Fixed On querying private_endpoint_connections from table azure_mariadb_server it gives {} as result Closes #630 #631

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jul 13, 2023

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 300

SETUP: tests/azure_mariadb_server []

PRETEST: tests/azure_mariadb_server

TEST: tests/azure_mariadb_server
Running terraform
data.azurerm_client_config.current: Refreshing state...
data.null_data_source.resource: Refreshing state...
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 2s [id=/subscriptions/********-****-****-****-************/resourceGroups/turbottest54160]
azurerm_mariadb_server.named_test_resource: Creating...
azurerm_mariadb_server.named_test_resource: Still creating... [10s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [20s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [30s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [40s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [50s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [1m0s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [1m10s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [1m20s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [1m30s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [1m40s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [1m50s elapsed]
azurerm_mariadb_server.named_test_resource: Still creating... [2m0s elapsed]
azurerm_mariadb_server.named_test_resource: Creation complete after 2m9s [id=/subscriptions/********-****-****-****-************/resourceGroups/turbottest54160/providers/Microsoft.DBforMariaDB/servers/turbottest54160]

Warning: Deprecated 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


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

Outputs:

fqdn = turbottest54160.mariadb.database.azure.com
location = eastus
resource_aka = azure:///subscriptions/********-****-****-****-************/resourceGroups/turbottest54160/providers/Microsoft.DBforMariaDB/servers/turbottest54160
resource_aka_lower = azure:///subscriptions/********-****-****-****-************/resourcegroups/turbottest54160/providers/microsoft.dbformariadb/servers/turbottest54160
resource_id = /subscriptions/********-****-****-****-************/resourceGroups/turbottest54160/providers/Microsoft.DBforMariaDB/servers/turbottest54160
resource_name = turbottest54160
subscription_id = ********-****-****-****-************

Running SQL query: test-get-query.sql
[
  {
    "administrator_login": "steampipeadmin",
    "auto_grow_enabled": "Disabled",
    "backup_retention_days": 7,
    "fully_qualified_domain_name": "turbottest54160.mariadb.database.azure.com",
    "geo_redundant_backup_enabled": "Disabled",
    "id": "/subscriptions/********-****-****-****-************/resourceGroups/turbottest54160/providers/Microsoft.DBforMariaDB/servers/turbottest54160",
    "name": "turbottest54160",
    "public_network_access": "Enabled",
    "sku_capacity": 1,
    "sku_family": "Gen5",
    "sku_name": "B_Gen5_1",
    "sku_tier": "Basic",
    "ssl_enforcement": "Enabled",
    "storage_mb": 5120,
    "type": "Microsoft.DBforMariaDB/servers",
    "user_visible_state": "Ready",
    "version": "10.2"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/********-****-****-****-************/resourceGroups/turbottest54160/providers/Microsoft.DBforMariaDB/servers/turbottest54160",
    "name": "turbottest54160"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "id": "/subscriptions/********-****-****-****-************/resourceGroups/turbottest54160/providers/Microsoft.DBforMariaDB/servers/turbottest54160",
    "name": "turbottest54160",
    "region": "eastus",
    "resource_group": "turbottest54160",
    "subscription_id": "********-****-****-****-************",
    "title": "turbottest54160"
  }
]
✔ PASSED

POSTTEST: tests/azure_mariadb_server

TEARDOWN: tests/azure_mariadb_server

SUMMARY:

1/1 passed.

Example query results

Results
> select name, jsonb_pretty(private_endpoint_connections) as private_endpoint_connections from azure_mariadb_server
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name    | private_endpoint_connections                                                                                                                                                                                                               |
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| temp-pc | [                                                                                                                                                                                                                                          |
|         |     {                                                                                                                                                                                                                                      |
|         |         "id": "/subscriptions/3r45tefd-f95f-4771-bbb5-529d4c76shd4/resourceGroups/demo/providers/Microsoft.DBforMariaDB/servers/temp-pc/privateEndpointConnections/temp-maria-db-private-endpoint-2-ac381ef9-778b-4f61-aab6-bf27a9f1d00d", |
|         |         "provisioningState": "Approving",                                                                                                                                                                                                  |
|         |         "privateEndpointPropertyId": "/subscriptions/3r45tefd-f95f-4771-bbb5-529d4c76shd4/resourceGroups/demo/providers/Microsoft.Network/privateEndpoints/temp-maria-db-private-endpoint-2",                                              |
|         |         "privateLinkServiceConnectionStateStatus": "Approved",                                                                                                                                                                             |
|         |         "privateLinkServiceConnectionStateDescription": "Auto-approved",                                                                                                                                                                   |
|         |         "privateLinkServiceConnectionStateActionsRequired": "None"                                                                                                                                                                         |
|         |     },                                                                                                                                                                                                                                     |
|         |     {                                                                                                                                                                                                                                      |
|         |         "id": "/subscriptions/3r45tefd-f95f-4771-bbb5-529d4c76shd4/resourceGroups/demo/providers/Microsoft.DBforMariaDB/servers/temp-pc/privateEndpointConnections/temp-maria-db-private-endpoint-83c8517b-46de-4d3b-9a12-9ee2ac33cdd2",   |
|         |         "provisioningState": "Ready",                                                                                                                                                                                                      |
|         |         "privateEndpointPropertyId": "/subscriptions/3r45tefd-f95f-4771-bbb5-529d4c76shd4/resourceGroups/demo/providers/Microsoft.Network/privateEndpoints/temp-maria-db-private-endpoint",                                                |
|         |         "privateLinkServiceConnectionStateStatus": "Approved",                                                                                                                                                                             |
|         |         "privateLinkServiceConnectionStateDescription": "Auto-approved",                                                                                                                                                                   |
|         |         "privateLinkServiceConnectionStateActionsRequired": "None"                                                                                                                                                                         |
|         |     }                                                                                                                                                                                                                                      |
|         | ]                                                                                                                                                                                                                                          |
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

@misraved misraved merged commit 2e502ac into main Jul 14, 2023
@misraved misraved deleted the issue-630 branch July 14, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants