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_hpc_cache. Closes #320 #374

Merged
merged 3 commits into from
Oct 5, 2021
Merged

Add table azure_hpc_cache. Closes #320 #374

merged 3 commits into from
Oct 5, 2021

Conversation

c0d3r-arnab
Copy link
Contributor

Integration test logs

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

PRETEST: tests/azure_hpc_cache

TEST: tests/azure_hpc_cache
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_hpc_cache.named_test_resource will be created
  + resource "azurerm_hpc_cache" "named_test_resource" {
      + cache_size_in_gb    = 3072
      + id                  = (known after apply)
      + location            = "westeurope"
      + mount_addresses     = (known after apply)
      + mtu                 = 1500
      + name                = "turbottest12955"
      + ntp_server          = "time.windows.com"
      + resource_group_name = "turbottest12955"
      + root_squash_enabled = (known after apply)
      + sku_name            = "Standard_2G"
      + subnet_id           = (known after apply)

      + default_access_policy {
          + access_rule {
              + access                  = (known after apply)
              + anonymous_gid           = (known after apply)
              + anonymous_uid           = (known after apply)
              + filter                  = (known after apply)
              + root_squash_enabled     = (known after apply)
              + scope                   = (known after apply)
              + submount_access_enabled = (known after apply)
              + suid_enabled            = (known after apply)
            }
        }
    }

  # azurerm_resource_group.named_test_resource will be created
  + resource "azurerm_resource_group" "named_test_resource" {
      + id       = (known after apply)
      + location = "westeurope"
      + name     = "turbottest12955"
    }

  # azurerm_subnet.named_test_resource will be created
  + resource "azurerm_subnet" "named_test_resource" {
      + address_prefix                                 = (known after apply)
      + address_prefixes                               = [
          + "10.0.1.0/24",
        ]
      + enforce_private_link_endpoint_network_policies = false
      + enforce_private_link_service_network_policies  = false
      + id                                             = (known after apply)
      + name                                           = "turbottest12955"
      + resource_group_name                            = "turbottest12955"
      + virtual_network_name                           = "turbottest12955"
    }

  # azurerm_virtual_network.named_test_resource will be created
  + resource "azurerm_virtual_network" "named_test_resource" {
      + address_space         = [
          + "10.0.0.0/16",
        ]
      + dns_servers           = (known after apply)
      + guid                  = (known after apply)
      + id                    = (known after apply)
      + location              = "westeurope"
      + name                  = "turbottest12955"
      + resource_group_name   = "turbottest12955"
      + subnet                = (known after apply)
      + vm_protection_enabled = false
    }

Plan: 4 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_id_upper  = "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/TURBOTTEST12955/providers/Microsoft.StorageCache/caches/turbottest12955"
  + resource_name      = "turbottest12955"
  + sku_name           = "Standard_2G"
  + 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/turbottest12955]
azurerm_virtual_network.named_test_resource: Creating...
azurerm_virtual_network.named_test_resource: Still creating... [10s elapsed]
azurerm_virtual_network.named_test_resource: Creation complete after 11s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest12955/providers/Microsoft.Network/virtualNetworks/turbottest12955]
azurerm_subnet.named_test_resource: Creating...
azurerm_subnet.named_test_resource: Creation complete after 6s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest12955/providers/Microsoft.Network/virtualNetworks/turbottest12955/subnets/turbottest12955]
azurerm_hpc_cache.named_test_resource: Creating...
azurerm_hpc_cache.named_test_resource: Still creating... [10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [1m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [1m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [1m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [1m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [1m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [1m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [2m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [2m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [2m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [2m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [2m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [2m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [3m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [3m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [3m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [3m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [3m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [3m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [4m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [4m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [4m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [4m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [4m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [4m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [5m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [5m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [5m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [5m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [5m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [5m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [6m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [6m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [6m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [6m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [6m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [6m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [7m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [7m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [7m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [7m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [7m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [7m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [8m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [8m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [8m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [8m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [8m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [8m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [9m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [9m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [9m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [9m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [9m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [9m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [10m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [10m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [10m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [10m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [10m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [10m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [11m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [11m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [11m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [11m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [11m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [11m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [12m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [12m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [12m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [12m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [12m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [12m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [13m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [13m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [13m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [13m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [13m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [13m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [14m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [14m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [14m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [14m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [14m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [14m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [15m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [15m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [15m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [15m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [15m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [15m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [16m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [16m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [16m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [16m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [16m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [16m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [17m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [17m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [17m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [17m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [17m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [17m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [18m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [18m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [18m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [18m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [18m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [18m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [19m0s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [19m10s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [19m20s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [19m30s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [19m40s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [19m50s elapsed]
azurerm_hpc_cache.named_test_resource: Still creating... [20m1s elapsed]
azurerm_hpc_cache.named_test_resource: Creation complete after 20m7s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest12955/providers/Microsoft.StorageCache/caches/turbottest12955]

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

Outputs:

region = "westeurope"
resource_aka = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest12955/providers/Microsoft.StorageCache/caches/turbottest12955"
resource_aka_lower = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest12955/providers/microsoft.storagecache/caches/turbottest12955"
resource_id = "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest12955/providers/Microsoft.StorageCache/caches/turbottest12955"
resource_id_upper = "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/TURBOTTEST12955/providers/Microsoft.StorageCache/caches/turbottest12955"
resource_name = "turbottest12955"
sku_name = "Standard_2G"
subscription_id = "d46d7416-f95f-4771-bbb5-529d4c76659c"

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

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/TURBOTTEST12955/providers/Microsoft.StorageCache/caches/turbottest12955",
    "name": "turbottest12955",
    "region": "westeurope",
    "resource_group": "turbottest12955",
    "sku_name": "Standard_2G",
    "subscription_id": "d46d7416-f95f-4771-bbb5-529d4c76659c",
    "type": "Microsoft.StorageCache/caches"
  }
]
✔ 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/turbottest12955/providers/Microsoft.StorageCache/caches/turbottest12955",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest12955/providers/microsoft.storagecache/caches/turbottest12955"
    ],
    "name": "turbottest12955",
    "title": "turbottest12955"
  }
]
✔ PASSED

POSTTEST: tests/azure_hpc_cache

TEARDOWN: tests/azure_hpc_cache

SUMMARY:

1/1 passed.

Example query results

Results
> select
  id,
  name,
  type,
  provisioning_state,
  sku_name
from
  azure_hpc_cache;
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-------------------------------+--------------------+-------------+
| id                                                                                                                                            | name            | type                          | provisioning_state | sku_name    |
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-------------------------------+--------------------+-------------+
| /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/ARNAB-TEST-RESOURCE-GROUP/providers/Microsoft.StorageCache/caches/test-hpc | test-hpc        | Microsoft.StorageCache/caches | Creating           | Standard_2G |
| /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/TURBOTTEST63455/providers/Microsoft.StorageCache/caches/turbottest63455    | turbottest63455 | Microsoft.StorageCache/caches | Creating           | Standard_2G |
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-------------------------------+--------------------+-------------+
> select
  id,
  name,
  network_settings ->> 'DNSSearchDomain' as dns_search_domain,
  network_settings -> 'Mtu' as mtu,
  network_settings ->> 'NtpServer' as ntp_server,
  jsonb_pretty(network_settings -> 'DNSServers') as dns_servers,
  jsonb_pretty(network_settings -> 'UtilityAddresses') as utility_addresses
from
  azure_hpc_cache;
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-------------------+------+------------------+-------------+-------------------+
| id                                                                                                                                            | name            | dns_search_domain | mtu  | ntp_server       | dns_servers | utility_addresses |
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-------------------+------+------------------+-------------+-------------------+
| /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/TURBOTTEST63455/providers/Microsoft.StorageCache/caches/turbottest63455    | turbottest63455 | <null>            | 1500 | time.windows.com | null        | null              |
| /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/ARNAB-TEST-RESOURCE-GROUP/providers/Microsoft.StorageCache/caches/test-hpc | test-hpc        | <null>            | 1500 | time.windows.com | null        | null              |
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-------------------+------+------------------+-------------+-------------------+
> select
  id,
  name,
  encryption_settings -> 'keyEncryptionKey' ->> 'keyUrl'  as key_url,
  encryption_settings -> 'keyEncryptionKey' -> 'sourceVault' ->> 'id'  as source_vault_id,
  network_settings -> 'rotationToLatestKeyVersionEnabled' as rotation_to_latest_key_version_enabled
from
  azure_hpc_cache;
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
| id                                                                                                                                            | name            | key_url                                                                            | source_vault_id                                                                                                                              | rotation_to_latest_key_version_enabled |
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
| /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/ARNAB-TEST-RESOURCE-GROUP/providers/Microsoft.StorageCache/caches/test-hpc | test-hpc        | https://testing-hpc.vault.azure.net/keys/test-key/d752dc5cdd36401189373cca4e531ead | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.KeyVault/vaults/testing-hpc | <null>                                 |
| /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/TURBOTTEST63455/providers/Microsoft.StorageCache/caches/turbottest63455    | turbottest63455 | <null>                                                                             | <null>                                                                                                                                       | <null>                                 |
+-----------------------------------------------------------------------------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+

@c0d3r-arnab c0d3r-arnab self-assigned this Oct 4, 2021
@c0d3r-arnab c0d3r-arnab linked an issue Oct 4, 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 1cabbac into main Oct 5, 2021
@bigdatasourav bigdatasourav deleted the issue-320 branch October 5, 2021 07:47
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_hpc_cache
2 participants