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_compute_virtual_machine_scale_set closes #190 #249

Merged
merged 10 commits into from
Aug 12, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Aug 10, 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_virtual_machine_scale_set []

PRETEST: tests/azure_virtual_machine_scale_set

TEST: tests/azure_virtual_machine_scale_set
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/turbottest78695]
azurerm_virtual_network.named_test_resource: Creating...
azurerm_public_ip.named_test_resource: Creating...
azurerm_virtual_network.named_test_resource: Creation complete after 9s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Network/virtualNetworks/turbottest78695]
azurerm_subnet.named_test_resource: Creating...
azurerm_public_ip.named_test_resource: Creation complete after 10s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Network/publicIPAddresses/turbottest78695]
azurerm_lb.named_test_resource: Creating...
azurerm_subnet.named_test_resource: Creation complete after 4s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Network/virtualNetworks/turbottest78695/subnets/turbottest78695]
azurerm_lb.named_test_resource: Creation complete after 8s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Network/loadBalancers/turbottest78695]
azurerm_lb_backend_address_pool.named_test_resource: Creating...
azurerm_lb_nat_pool.named_test_resource: Creating...
azurerm_lb_nat_pool.named_test_resource: Creation complete after 6s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Network/loadBalancers/turbottest78695/inboundNatPools/ssh]
azurerm_lb_backend_address_pool.named_test_resource: Creation complete after 9s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Network/loadBalancers/turbottest78695/backendAddressPools/turbottest78695]
azurerm_virtual_machine_scale_set.named_test_resource: Creating...
azurerm_virtual_machine_scale_set.named_test_resource: Still creating... [10s elapsed]
azurerm_virtual_machine_scale_set.named_test_resource: Still creating... [20s elapsed]
azurerm_virtual_machine_scale_set.named_test_resource: Still creating... [30s elapsed]
azurerm_virtual_machine_scale_set.named_test_resource: Still creating... [40s elapsed]
azurerm_virtual_machine_scale_set.named_test_resource: Still creating... [50s elapsed]
azurerm_virtual_machine_scale_set.named_test_resource: Still creating... [1m0s elapsed]
azurerm_virtual_machine_scale_set.named_test_resource: Still creating... [1m10s elapsed]
azurerm_virtual_machine_scale_set.named_test_resource: Creation complete after 1m16s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Compute/virtualMachineScaleSets/turbottest78695]

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: 8 added, 0 changed, 0 destroyed.

Outputs:

resource_aka = azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Compute/virtualMachineScaleSets/turbottest78695
resource_aka_lower = azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest78695/providers/microsoft.compute/virtualmachinescalesets/turbottest78695
resource_id = /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Compute/virtualMachineScaleSets/turbottest78695
resource_name = turbottest78695

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Compute/virtualMachineScaleSets/turbottest78695",
    "name": "turbottest78695",
    "sku_name": "Standard_F2",
    "sku_tier": "Standard",
    "tags": {
      "Name": "turbottest78695"
    }
  }
]
✔ PASSED

Running SQL query: test-hydrate-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Compute/virtualMachineScaleSets/turbottest78695",
    "name": "turbottest78695",
    "type": "Microsoft.Compute/virtualMachineScaleSets"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest78695/providers/Microsoft.Compute/virtualMachineScaleSets/turbottest78695",
    "name": "turbottest78695"
  }
]
✔ 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/turbottest78695/providers/Microsoft.Compute/virtualMachineScaleSets/turbottest78695",
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest78695/providers/microsoft.compute/virtualmachinescalesets/turbottest78695"
    ],
    "tags": {
      "Name": "turbottest78695"
    },
    "title": "turbottest78695"
  }
]
✔ PASSED

POSTTEST: tests/azure_virtual_machine_scale_set

TEARDOWN: tests/azure_virtual_machine_scale_set

SUMMARY:

1/1 passed.

Example query results

Results

Basic Info

select
  name,
  id,
  identity,
  region,
  resource_group
from
  azure_virtual_machine_scale_set;
----------------+-------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+----------------+
| name           | id                                                                                                                                              | identity | region | resource_group |
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+----------------+
| test-scale-set | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/TURBOT_RG/providers/Microsoft.Compute/virtualMachineScaleSets/test-scale-set | <null>   | westus | turbot_rg      |
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------+----------------+

List Standard tier virtual machine scale set

select
  name,
  id,
  sku_name,
  sku_tier
from
  azure_virtual_machine_scale_set
where
   sku_tier = 'Standard';
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------+---------------+----------+
| name           | id                                                                                                                                              | sku_name      | sku_tier |
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------+---------------+----------+
| test-scale-set | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/TURBOT_RG/providers/Microsoft.Compute/virtualMachineScaleSets/test-scale-set | Standard_B1ls | Standard |
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------+---------------+----------+

List extensions for VM Scale set

select name, extensions from azure_virtual_machine_scale_set;
+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name           | extensions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| test-scale-set | [{"AutoUpgradeMinorVersion":true,"EnableAutomaticUpgrade":null,"ExtensionType":"Site24x7LinuxServerExtn","ForceUpdateTag":null,"Id":"/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/TURBOT_RG/providers/Microsoft.Compute/virtualMachineScaleSets/test-scale-set/extensions/Site24x7LinuxServerAgent","Name":"Site24x7LinuxServerAgent","ProtectedSettings":null,"ProvisionAfterExtensions":null,"ProvisioningState":"Creating","Publisher":"Site24x7","Settings":{"site24x7AgentType":"azurevmextnlinuxserver"},"Type":"Microsoft.Compute/virtualMachineScaleSets/extensions","TypeHandlerVersion":"1.0"}] |
+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+


@ParthaI ParthaI self-assigned this Aug 10, 2021
@ParthaI ParthaI linked an issue Aug 10, 2021 that may be closed by this pull request
Copy link
Contributor

@khushboo9024 khushboo9024 left a comment

Choose a reason for hiding this comment

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


name := d.KeyColumnQuals["name"].GetStringValue()
resourceGroup := d.KeyColumnQuals["resource_group"].GetStringValue()

Copy link
Contributor

Choose a reason for hiding this comment

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

Add empty check for name and resource_group.

@@ -0,0 +1,32 @@
# Table: azure_virtual_machine_scale_set

A virtual network gateway is used to establish secure, cross-premises connectivity.
Copy link
Contributor

Choose a reason for hiding this comment

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

Description is not proper, please change.


func tableAzureVirtualMachineScaleSet(_ context.Context) *plugin.Table {
return &plugin.Table{
Name: "azure_virtual_machine_scale_set",
Copy link
Contributor

Choose a reason for hiding this comment

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

Table name should be azure_compute_virtual_machine_scale_set

@khushboo9024 khushboo9024 changed the title Add table azure_compute_machine_scale_set closes #190 Add table azure_compute_virtual_machine_scale_set closes #190 Aug 11, 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

Copy link
Contributor

@rajlearner17 rajlearner17 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 f052375 into main Aug 12, 2021
@bigdatasourav bigdatasourav deleted the issue-190 branch August 12, 2021 08:31
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_compute_virtual_machine_scale_set
4 participants