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_hdinsight_cluster. Closes #388 #395

Merged
merged 1 commit into from
Oct 7, 2021
Merged

Conversation

c0d3r-arnab
Copy link
Contributor

Integration test logs

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

PRETEST: tests/azure_hdinsight_cluster

TEST: tests/azure_hdinsight_cluster
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_hdinsight_hadoop_cluster.named_test_resource will be created
  + resource "azurerm_hdinsight_hadoop_cluster" "named_test_resource" {
      + cluster_version     = "3.6"
      + https_endpoint      = (known after apply)
      + id                  = (known after apply)
      + location            = "westus"
      + name                = "turbottest16639"
      + resource_group_name = "turbottest16639"
      + ssh_endpoint        = (known after apply)
      + tier                = "Standard"

      + component_version {
          + hadoop = "2.7"
        }

      + gateway {
          + enabled  = true
          + password = (sensitive value)
          + username = "acctestusrgw"
        }

      + roles {

          + head_node {
              + password = (sensitive value)
              + username = "acctestusrvm"
              + vm_size  = "Standard_D3_V2"
            }

          + worker_node {
              + min_instance_count    = (known after apply)
              + password              = (sensitive value)
              + target_instance_count = 3
              + username              = "acctestusrvm"
              + vm_size               = "Standard_D4_V2"
            }

          + zookeeper_node {
              + password = (sensitive value)
              + username = "acctestusrvm"
              + vm_size  = "Standard_D3_V2"
            }
        }

      + storage_account {
          + is_default           = true
          + storage_account_key  = (sensitive value)
          + storage_container_id = (known after apply)
        }
    }

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

  # azurerm_storage_account.named_test_resource will be created
  + resource "azurerm_storage_account" "named_test_resource" {
      + access_tier                      = (known after apply)
      + account_kind                     = "StorageV2"
      + account_replication_type         = "LRS"
      + account_tier                     = "Standard"
      + allow_blob_public_access         = false
      + enable_https_traffic_only        = true
      + id                               = (known after apply)
      + is_hns_enabled                   = false
      + large_file_share_enabled         = (known after apply)
      + location                         = "westus"
      + min_tls_version                  = "TLS1_0"
      + name                             = "turbottest16639"
      + nfsv3_enabled                    = false
      + primary_access_key               = (sensitive value)
      + primary_blob_connection_string   = (sensitive value)
      + primary_blob_endpoint            = (known after apply)
      + primary_blob_host                = (known after apply)
      + primary_connection_string        = (sensitive value)
      + primary_dfs_endpoint             = (known after apply)
      + primary_dfs_host                 = (known after apply)
      + primary_file_endpoint            = (known after apply)
      + primary_file_host                = (known after apply)
      + primary_location                 = (known after apply)
      + primary_queue_endpoint           = (known after apply)
      + primary_queue_host               = (known after apply)
      + primary_table_endpoint           = (known after apply)
      + primary_table_host               = (known after apply)
      + primary_web_endpoint             = (known after apply)
      + primary_web_host                 = (known after apply)
      + resource_group_name              = "turbottest16639"
      + secondary_access_key             = (sensitive value)
      + secondary_blob_connection_string = (sensitive value)
      + secondary_blob_endpoint          = (known after apply)
      + secondary_blob_host              = (known after apply)
      + secondary_connection_string      = (sensitive value)
      + secondary_dfs_endpoint           = (known after apply)
      + secondary_dfs_host               = (known after apply)
      + secondary_file_endpoint          = (known after apply)
      + secondary_file_host              = (known after apply)
      + secondary_location               = (known after apply)
      + secondary_queue_endpoint         = (known after apply)
      + secondary_queue_host             = (known after apply)
      + secondary_table_endpoint         = (known after apply)
      + secondary_table_host             = (known after apply)
      + secondary_web_endpoint           = (known after apply)
      + secondary_web_host               = (known after apply)
      + shared_access_key_enabled        = true

      + blob_properties {
          + change_feed_enabled      = (known after apply)
          + default_service_version  = (known after apply)
          + last_access_time_enabled = (known after apply)
          + versioning_enabled       = (known after apply)

          + container_delete_retention_policy {
              + days = (known after apply)
            }

          + cors_rule {
              + allowed_headers    = (known after apply)
              + allowed_methods    = (known after apply)
              + allowed_origins    = (known after apply)
              + exposed_headers    = (known after apply)
              + max_age_in_seconds = (known after apply)
            }

          + delete_retention_policy {
              + days = (known after apply)
            }
        }

      + identity {
          + identity_ids = (known after apply)
          + principal_id = (known after apply)
          + tenant_id    = (known after apply)
          + type         = (known after apply)
        }

      + network_rules {
          + bypass                     = (known after apply)
          + default_action             = (known after apply)
          + ip_rules                   = (known after apply)
          + virtual_network_subnet_ids = (known after apply)

          + private_link_access {
              + endpoint_resource_id = (known after apply)
              + endpoint_tenant_id   = (known after apply)
            }
        }

      + queue_properties {
          + cors_rule {
              + allowed_headers    = (known after apply)
              + allowed_methods    = (known after apply)
              + allowed_origins    = (known after apply)
              + exposed_headers    = (known after apply)
              + max_age_in_seconds = (known after apply)
            }

          + hour_metrics {
              + enabled               = (known after apply)
              + include_apis          = (known after apply)
              + retention_policy_days = (known after apply)
              + version               = (known after apply)
            }

          + logging {
              + delete                = (known after apply)
              + read                  = (known after apply)
              + retention_policy_days = (known after apply)
              + version               = (known after apply)
              + write                 = (known after apply)
            }

          + minute_metrics {
              + enabled               = (known after apply)
              + include_apis          = (known after apply)
              + retention_policy_days = (known after apply)
              + version               = (known after apply)
            }
        }

      + routing {
          + choice                      = (known after apply)
          + publish_internet_endpoints  = (known after apply)
          + publish_microsoft_endpoints = (known after apply)
        }

      + share_properties {
          + cors_rule {
              + allowed_headers    = (known after apply)
              + allowed_methods    = (known after apply)
              + allowed_origins    = (known after apply)
              + exposed_headers    = (known after apply)
              + max_age_in_seconds = (known after apply)
            }

          + retention_policy {
              + days = (known after apply)
            }

          + smb {
              + authentication_types            = (known after apply)
              + channel_encryption_type         = (known after apply)
              + kerberos_ticket_encryption_type = (known after apply)
              + versions                        = (known after apply)
            }
        }
    }

  # azurerm_storage_container.named_test_resource will be created
  + resource "azurerm_storage_container" "named_test_resource" {
      + container_access_type   = "private"
      + has_immutability_policy = (known after apply)
      + has_legal_hold          = (known after apply)
      + id                      = (known after apply)
      + metadata                = (known after apply)
      + name                    = "turbottest16639"
      + resource_manager_id     = (known after apply)
      + storage_account_name    = "turbottest16639"
    }

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

Changes to Outputs:
  + cluster_version    = "3.6"
  + region             = "westus"
  + resource_aka       = (known after apply)
  + resource_aka_lower = (known after apply)
  + resource_id        = (known after apply)
  + resource_name      = "turbottest16639"
  + 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/turbottest16639]
azurerm_storage_account.named_test_resource: Creating...
azurerm_storage_account.named_test_resource: Still creating... [10s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [20s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [30s elapsed]
azurerm_storage_account.named_test_resource: Creation complete after 34s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest16639/providers/Microsoft.Storage/storageAccounts/turbottest16639]
azurerm_storage_container.named_test_resource: Creating...
azurerm_storage_container.named_test_resource: Creation complete after 1s [id=https://turbottest16639.blob.core.windows.net/turbottest16639]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Creating...
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [1m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [1m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [1m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [1m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [1m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [1m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [2m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [2m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [2m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [2m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [2m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [2m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [3m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [3m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [3m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [3m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [3m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [3m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [4m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [4m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [4m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [4m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [4m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [4m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [5m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [5m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [5m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [5m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [5m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [5m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [6m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [6m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [6m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [6m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [6m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [6m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [7m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [7m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [7m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [7m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [7m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [7m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [8m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [8m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [8m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [8m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [8m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [8m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [9m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [9m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [9m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [9m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [9m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [9m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [10m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [10m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [10m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [10m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [10m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [10m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [11m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [11m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [11m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [11m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [11m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [11m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [12m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [12m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [12m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [12m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [12m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [12m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [13m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [13m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [13m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [13m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [13m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [13m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [14m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [14m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [14m20s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [14m30s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [14m40s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [14m50s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [15m0s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Still creating... [15m10s elapsed]
azurerm_hdinsight_hadoop_cluster.named_test_resource: Creation complete after 15m14s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest16639/providers/Microsoft.HDInsight/clusters/turbottest16639]

Warning: Argument is deprecated

  with azurerm_hdinsight_hadoop_cluster.named_test_resource,
  on variables.tf line 66, in resource "azurerm_hdinsight_hadoop_cluster" "named_test_resource":
  66:     enabled  = true

HDInsight doesn't support disabling gateway anymore

(and 2 more similar warnings elsewhere)

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

Outputs:

cluster_version = "3.6"
region = "westus"
resource_aka = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest16639/providers/Microsoft.HDInsight/clusters/turbottest16639"
resource_aka_lower = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest16639/providers/microsoft.hdinsight/clusters/turbottest16639"
resource_id = "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest16639/providers/Microsoft.HDInsight/clusters/turbottest16639"
resource_name = "turbottest16639"
subscription_id = "d46d7416-f95f-4771-bbb5-529d4c76659c"

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

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest16639/providers/Microsoft.HDInsight/clusters/turbottest16639",
    "name": "turbottest16639",
    "region": "westus",
    "resource_group": "turbottest16639",
    "subscription_id": "d46d7416-f95f-4771-bbb5-529d4c76659c",
    "type": "Microsoft.HDInsight/clusters"
  }
]
✔ 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/turbottest16639/providers/Microsoft.HDInsight/clusters/turbottest16639",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest16639/providers/microsoft.hdinsight/clusters/turbottest16639"
    ],
    "name": "turbottest16639",
    "title": "turbottest16639"
  }
]
✔ PASSED

POSTTEST: tests/azure_hdinsight_cluster

TEARDOWN: tests/azure_hdinsight_cluster

SUMMARY:

1/1 passed.

Example query results

Results
> select
  name,
  id,
  provisioning_state,
  type,
  cluster_hdp_version,
  cluster_id,
  cluster_state,
  cluster_version,
  created_date
from
  azure_hdinsight_cluster;
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------------+---------------------+----------------------------------+----------------------+-----------------+------------------------+
| name            | id                                                                                                                                                | provisioning_state | type                         | cluster_hdp_version | cluster_id                       | cluster_state        | cluster_version | created_date           |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------------+---------------------+----------------------------------+----------------------+-----------------+------------------------+
| turbottest67558 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest67558/providers/Microsoft.HDInsight/clusters/turbottest67558         | InProgress         | Microsoft.HDInsight/clusters |                     | d4f9cc5a6cd14fe1a464e45fad49d93f | AzureVMConfiguration | 3.6.2000.67     | 2021-10-07T10:37:01.62 |
| testcluster13   | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.HDInsight/clusters/testcluster13 | Succeeded          | Microsoft.HDInsight/clusters | 4.1.7.7             | ff9f9eec2ff94a50ac711a5c59314113 | Running              | 4.0.3000.1      | 2021-10-07T09:39:57.61 |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------------+---------------------+----------------------------------+----------------------+-----------------+------------------------+
> select
  name,
  id,
  encryption_in_transit_properties -> 'isEncryptionInTransitEnabled' as is_encryption_in_transit_enabled
from
  azure_hdinsight_cluster
where
  (encryption_in_transit_properties ->> 'isEncryptionInTransitEnabled')::boolean;
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+
| name          | id                                                                                                                                                | is_encryption_in_transit_enabled |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+
| testcluster13 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.HDInsight/clusters/testcluster13 | true                             |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+
> select
  name,
  id,
  disk_encryption_properties ->> 'encryptionAlgorithm' as encryption_algorithm,
  disk_encryption_properties -> 'encryptionAtHost' as encryption_at_host,
  disk_encryption_properties ->> 'keyName' as key_name,
  disk_encryption_properties ->> 'keyVersion' as key_version,
  disk_encryption_properties ->> 'msiResourceId' as msi_resource_id,
  disk_encryption_properties ->> 'vaultUri' as vault_uri 
from
  azure_hdinsight_cluster;
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+--------------------+-----------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
| name            | id                                                                                                                                                | encryption_algorithm | encryption_at_host | key_name        | key_version                      | msi_resource_id                                                                                                                                                               | vault_uri                                 |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+--------------------+-----------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
| turbottest67558 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest67558/providers/Microsoft.HDInsight/clusters/turbottest67558         | <null>               | <null>             | <null>          | <null>                           | <null>                                                                                                                                                                        | <null>                                    |
| testcluster13   | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.HDInsight/clusters/testcluster13 | RSA-OAEP             | true               | kafkaClusterKey | 2de5032c41614f69b4d116e5c293aea6 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/arnab-test-resource-group/providers/microsoft.managedidentity/userassignedidentities/test-managed-identity | https://testing-hdinsight.vault.azure.net |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+--------------------+-----------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
> select
  name,
  id,
  endpoint ->> 'location' as endpoint_location,
  endpoint ->> 'name' as endpoint_name,
  endpoint -> 'port' as endpoint_port,
  endpoint ->> 'protocol' as endpoint_protocol,
  endpoint ->> 'privateIpAddress' as endpoint_private_ip_address
from
  azure_hdinsight_cluster,
  jsonb_array_elements(connectivity_endpoints) as endpoint;
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+---------------+---------------+-------------------+-----------------------------+
| name            | id                                                                                                                                                | endpoint_location                      | endpoint_name | endpoint_port | endpoint_protocol | endpoint_private_ip_address |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+---------------+---------------+-------------------+-----------------------------+
| turbottest67558 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest67558/providers/Microsoft.HDInsight/clusters/turbottest67558         | turbottest67558-ssh.azurehdinsight.net | SSH           | 22            | TCP               | <null>                      |
| turbottest67558 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest67558/providers/Microsoft.HDInsight/clusters/turbottest67558         | turbottest67558.azurehdinsight.net     | HTTPS         | 443           | TCP               | <null>                      |
| testcluster13   | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.HDInsight/clusters/testcluster13 | testcluster13-ssh.azurehdinsight.net   | SSH           | 22            | TCP               | <null>                      |
| testcluster13   | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/arnab-test-resource-group/providers/Microsoft.HDInsight/clusters/testcluster13 | testcluster13.azurehdinsight.net       | HTTPS         | 443           | TCP               | <null>                      |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+---------------+---------------+-------------------+-----------------------------+

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

@ParthaI ParthaI 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 ce21b3d into main Oct 7, 2021
@bigdatasourav bigdatasourav deleted the issue-388 branch October 7, 2021 14:19
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_hdinsight_cluster
3 participants