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_express_route_circuit. Closes #153 #170

Merged
merged 8 commits into from
Jul 8, 2021
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jul 5, 2021

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_express_route_circuit []

PRETEST: tests/azure_express_route_circuit

TEST: tests/azure_express_route_circuit
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 3s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922]
azurerm_express_route_circuit.named_test_resource: Creating...
azurerm_express_route_circuit.named_test_resource: Still creating... [10s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [20s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [30s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [40s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [50s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [1m0s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [1m10s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [1m20s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [1m30s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [1m40s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [1m50s elapsed]
azurerm_express_route_circuit.named_test_resource: Still creating... [2m0s elapsed]
azurerm_express_route_circuit.named_test_resource: Creation complete after 2m0s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922/providers/Microsoft.Network/expressRouteCircuits/turbottest21922]

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:

resource_aka = azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922/providers/Microsoft.Network/expressRouteCircuits/turbottest21922
resource_aka_lower = azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest21922/providers/microsoft.network/expressroutecircuits/turbottest21922
resource_id = /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922/providers/Microsoft.Network/expressRouteCircuits/turbottest21922
resource_name = turbottest21922
sku_family = MeteredData
sku_tire = Standard
subscription_id = d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922/providers/Microsoft.Network/expressRouteCircuits/turbottest21922",
    "name": "turbottest21922",
    "resource_group": "turbottest21922",
    "sku_tier": "Standard"
  }
]
✔ PASSED

Running SQL query: test-hydrate-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922/providers/Microsoft.Network/expressRouteCircuits/turbottest21922",
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest21922/providers/microsoft.network/expressroutecircuits/turbottest21922"
    ],
    "name": "turbottest21922",
    "sku_name": "Standard_MeteredData",
    "sku_tier": "Standard",
    "tags": {
      "Name": "turbottest21922"
    },
    "title": "turbottest21922"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922/providers/Microsoft.Network/expressRouteCircuits/turbottest21922",
    "name": "turbottest21922"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest21922/providers/Microsoft.Network/expressRouteCircuits/turbottest21922",
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest21922/providers/microsoft.network/expressroutecircuits/turbottest21922"
    ],
    "name": "turbottest21922",
    "tags": {
      "Name": "turbottest21922"
    },
    "title": "turbottest21922"
  }
]
✔ PASSED

POSTTEST: tests/azure_express_route_circuit

TEARDOWN: tests/azure_express_route_circuit

SUMMARY:

1/1 passed.

Example query results

Results

Basic info

select
  name,
  id,
  allow_classic_operations,
  circuit_provisioning_state
from
  azure_express_route_circuit;
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------+--------
| name               | id                                                                                                                                               | allow_classic_operations | circuit
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------+--------
| test_express_route | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbot_rg/providers/Microsoft.Network/expressRouteCircuits/test_express_route | false                    | Enabled
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------+--------

List express route circuits which do not have global reach enabled

select
  name,
  sku_tier,
  sku_name
from
  azure_express_route_circuit
where
  not global_reach_enabled;
+--------------------+----------+----------------------+
| name               | sku_tier | sku_name             |
+--------------------+----------+----------------------+
| test_express_route | Standard | Standard_MeteredData |
+--------------------+----------+----------------------+

List the standard category express route circuits

select
  name,
  sku_tier,
  sku_name
from
  azure_express_route_circuit
where
  sku_tier = 'Standard';
+--------------------+----------+----------------------+
| name               | sku_tier | sku_name             |
+--------------------+----------+----------------------+
| test_express_route | Standard | Standard_MeteredData |

@ParthaI ParthaI requested a review from bigdatasourav July 5, 2021 13:09
@ParthaI ParthaI self-assigned this Jul 5, 2021
@ParthaI ParthaI linked an issue Jul 5, 2021 that may be closed by this pull request
@bigdatasourav bigdatasourav changed the title Add table azure_express_route_circuit closes #153 Add table azure_express_route_circuit. Closes #153 Jul 6, 2021
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 requested a review from cbruno10 July 6, 2021 06:55
Copy link
Contributor

@Subhajit97 Subhajit97 left a comment

Choose a reason for hiding this comment

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

@ParthaI Please see comments, thanks!

@cbruno10 cbruno10 merged commit cde70b9 into main Jul 8, 2021
@cbruno10 cbruno10 deleted the issue-153 branch July 8, 2021 18:38
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_express_route_circuit
5 participants