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

Add table azure_signalr_service. Closes #296 #328

Merged
merged 3 commits into from
Sep 28, 2021
Merged

Add table azure_signalr_service. Closes #296 #328

merged 3 commits into from
Sep 28, 2021

Conversation

c0d3r-arnab
Copy link
Contributor

Integration test logs

Logs
arnab@turbotindias-MacBook-Pro azure-test % ./tint.js azure_signalr_service
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_signalr_service []

PRETEST: tests/azure_signalr_service

TEST: tests/azure_signalr_service
Running terraform

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 = "westeurope"
      + name     = "turbottest89752"
    }

  # azurerm_signalr_service.named_test_resource will be created
  + resource "azurerm_signalr_service" "named_test_resource" {
      + hostname                    = (known after apply)
      + id                          = (known after apply)
      + ip_address                  = (known after apply)
      + location                    = "westeurope"
      + name                        = "turbottest89752"
      + primary_access_key          = (sensitive value)
      + primary_connection_string   = (sensitive value)
      + public_port                 = (known after apply)
      + resource_group_name         = "turbottest89752"
      + secondary_access_key        = (sensitive value)
      + secondary_connection_string = (sensitive value)
      + server_port                 = (known after apply)

      + cors {
          + allowed_origins = (known after apply)
        }

      + features {
          + flag  = (known after apply)
          + value = (known after apply)
        }

      + sku {
          + capacity = 1
          + name     = "Free_F1"
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + region             = "westeurope"
  + resource_aka       = (known after apply)
  + resource_aka_lower = (known after apply)
  + resource_id        = (known after apply)
  + resource_name      = "turbottest89752"
  + subscription_id    = "d46d7416-f95f-4771-bbb5-529d4c76659c"
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 3s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest89752]
azurerm_signalr_service.named_test_resource: Creating...
azurerm_signalr_service.named_test_resource: Still creating... [10s elapsed]
azurerm_signalr_service.named_test_resource: Still creating... [20s elapsed]
azurerm_signalr_service.named_test_resource: Still creating... [30s elapsed]
azurerm_signalr_service.named_test_resource: Still creating... [40s elapsed]
azurerm_signalr_service.named_test_resource: Still creating... [50s elapsed]
azurerm_signalr_service.named_test_resource: Still creating... [1m0s elapsed]
azurerm_signalr_service.named_test_resource: Still creating... [1m10s elapsed]
azurerm_signalr_service.named_test_resource: Creation complete after 1m15s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest89752/providers/Microsoft.SignalRService/SignalR/turbottest89752]

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

Outputs:

region = "westeurope"
resource_aka = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest89752/providers/Microsoft.SignalRService/SignalR/turbottest89752"
resource_aka_lower = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest89752/providers/microsoft.signalrservice/signalr/turbottest89752"
resource_id = "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest89752/providers/Microsoft.SignalRService/SignalR/turbottest89752"
resource_name = "turbottest89752"
subscription_id = "d46d7416-f95f-4771-bbb5-529d4c76659c"

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest89752/providers/Microsoft.SignalRService/SignalR/turbottest89752",
    "name": "turbottest89752",
    "region": "westeurope",
    "resource_group": "turbottest89752",
    "subscription_id": "d46d7416-f95f-4771-bbb5-529d4c76659c",
    "type": "Microsoft.SignalRService/SignalR"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest89752/providers/Microsoft.SignalRService/SignalR/turbottest89752",
    "name": "turbottest89752",
    "region": "westeurope",
    "resource_group": "turbottest89752",
    "subscription_id": "d46d7416-f95f-4771-bbb5-529d4c76659c",
    "type": "Microsoft.SignalRService/SignalR"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest89752/providers/Microsoft.SignalRService/SignalR/turbottest89752",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest89752/providers/microsoft.signalrservice/signalr/turbottest89752"
    ],
    "name": "turbottest89752",
    "title": "turbottest89752"
  }
]
✔ PASSED

POSTTEST: tests/azure_signalr_service

TEARDOWN: tests/azure_signalr_service

SUMMARY:

1/1 passed.

Example query results

Results
> select
  name,
  id,
  type,
  kind,
  provisioning_state
from
  azure_signalr_service;
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
| name           | id                                                                                                                                                     | type                            
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
| test-signalr-1 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.SignalRService/SignalR/test-signalr-1 | Microsoft.SignalRService/SignalR
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
> select
  name,
  id,
  type,
  provisioning_state,
  network_acls ->> 'defaultAction' as default_action,
  jsonb_pretty(network_acls -> 'privateEndpoints') as private_endpoints,
  jsonb_pretty(network_acls -> 'publicNetwork') as public_network
from
  azure_signalr_service;
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
| name           | id                                                                                                                                                     | type                            
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
| test-signalr-1 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.SignalRService/SignalR/test-signalr-1 | Microsoft.SignalRService/SignalR
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
> select
  name,
  id,
  connections ->> 'ID' as connection_id,
  connections ->> 'Name' as connection_name,
  connections ->> 'PrivateEndpointPropertyID' as property_private_endpoint_id,
  jsonb_pretty(connections -> 'PrivateLinkServiceConnectionState') as property_private_link_service_connection_state,
  connections ->> 'Type' as connection_type
from
  azure_signalr_service,
  jsonb_array_elements(private_endpoint_connections) as connections;
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
| name           | id                                                                                                                                                     | connection_id                   
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
| test-signalr-1 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.SignalRService/SignalR/test-signalr-1 | /subscriptions/d46d7416-f95f-477
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
|                |                                                                                                                                                        |                                 
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------
> 

@c0d3r-arnab c0d3r-arnab self-assigned this Sep 22, 2021
@c0d3r-arnab c0d3r-arnab linked an issue Sep 22, 2021 that may be closed by this pull request
Copy link
Contributor

@bigdatasourav bigdatasourav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bigdatasourav bigdatasourav merged commit d5ca7a3 into main Sep 28, 2021
@bigdatasourav bigdatasourav deleted the issue-296 branch September 28, 2021 07:58
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_signalr_service
2 participants