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_machine_learning_workspace closes #294 #315

Merged
merged 9 commits into from
Sep 16, 2021
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Sep 14, 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_machine_learning_workspace []

PRETEST: tests/azure_machine_learning_workspace

TEST: tests/azure_machine_learning_workspace
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/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408]
azurerm_application_insights.named_test_resource: Creating...
azurerm_key_vault.named_test_resource: Creating...
azurerm_storage_account.named_test_resource: Creating...
azurerm_application_insights.named_test_resource: Still creating... [10s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [10s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [10s elapsed]
azurerm_application_insights.named_test_resource: Creation complete after 17s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/microsoft.insights/components/turbottest41408]
azurerm_key_vault.named_test_resource: Still creating... [20s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [20s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [30s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [30s elapsed]
azurerm_storage_account.named_test_resource: Creation complete after 38s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/Microsoft.Storage/storageAccounts/turbottest41408]
azurerm_key_vault.named_test_resource: Still creating... [40s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [50s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [1m0s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [1m10s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [1m20s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [1m30s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [1m40s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [1m50s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [2m0s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [2m10s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [2m20s elapsed]
azurerm_key_vault.named_test_resource: Still creating... [2m30s elapsed]
azurerm_key_vault.named_test_resource: Creation complete after 2m36s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/Microsoft.KeyVault/vaults/turbottest41408]
azurerm_machine_learning_workspace.named_test_resource: Creating...
azurerm_machine_learning_workspace.named_test_resource: Still creating... [10s elapsed]
azurerm_machine_learning_workspace.named_test_resource: Still creating... [20s elapsed]
azurerm_machine_learning_workspace.named_test_resource: Still creating... [30s elapsed]
azurerm_machine_learning_workspace.named_test_resource: Still creating... [40s elapsed]
azurerm_machine_learning_workspace.named_test_resource: Still creating... [50s elapsed]
azurerm_machine_learning_workspace.named_test_resource: Still creating... [1m0s elapsed]
azurerm_machine_learning_workspace.named_test_resource: Still creating... [1m10s elapsed]
azurerm_machine_learning_workspace.named_test_resource: Creation complete after 1m14s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/Microsoft.MachineLearningServices/workspaces/turbottest41408]

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

Outputs:

location = eastus
resource_aka = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/Microsoft.MachineLearningServices/workspaces/turbottest41408
resource_aka_lower = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest41408/providers/microsoft.machinelearningservices/workspaces/turbottest41408
resource_id = /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/Microsoft.MachineLearningServices/workspaces/turbottest41408
resource_name = turbottest41408
subscription_id = d46d7416-f95f-4771-bbb5-529d4c76659c

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/Microsoft.MachineLearningServices/workspaces/turbottest41408",
    "name": "turbottest41408",
    "region": "eastus",
    "resource_group": "turbottest41408",
    "subscription_id": "d46d7416-f95f-4771-bbb5-529d4c76659c",
    "tags": {
      "name": "turbottest41408"
    },
    "type": "Microsoft.MachineLearningServices/workspaces"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest41408/providers/Microsoft.MachineLearningServices/workspaces/turbottest41408",
    "name": "turbottest41408",
    "type": "Microsoft.MachineLearningServices/workspaces"
  }
]
✔ 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/turbottest41408/providers/Microsoft.MachineLearningServices/workspaces/turbottest41408",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest41408/providers/microsoft.machinelearningservices/workspaces/turbottest41408"
    ],
    "name": "turbottest41408",
    "tags": {
      "name": "turbottest41408"
    },
    "title": "turbottest41408"
  }
]
✔ PASSED

POSTTEST: tests/azure_machine_learning_workspace

TEARDOWN: tests/azure_machine_learning_workspace

SUMMARY:

1/1 passed.

Example query results

Results

Basic info

select
  name,
  id,
  type,
  provisioning_state
from
  azure_machine_learning_workspace;
+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+----------
| name | id                                                                                                                                       | type                                         | provision
+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+----------
| test | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbot_rg/providers/Microsoft.MachineLearningServices/workspaces/test | Microsoft.MachineLearningServices/workspaces | Succeeded
+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+---------

List system assigned identity type workspace

select
  name,
  id,
  type,
  identity ->> 'type' as identity_type
from
  azure_machine_learning_workspace
where
  identity ->> 'type' = 'SystemAssigned';
+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+----------
| name | id                                                                                                                                       | type                                         | identity_
+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+----------
| test | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbot_rg/providers/Microsoft.MachineLearningServices/workspaces/test | Microsoft.MachineLearningServices/workspaces | SystemAss
+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+----------

List key vault used by workspaces with soft deletion enabled

select
  m.name as workspace_name,
  m.id as workspace_id,
  v.soft_delete_enabled
from
  azure_machine_learning_workspace as m,
  azure_key_vault as v
where
  lower(m.key_vault) = lower(v.id) and v.soft_delete_enabled;
+----------------+------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
| workspace_name | workspace_id                                                                                                                             | soft_delete_enabled |
+----------------+------------------------------------------------------------------------------------------------------------------------------------------+---------------------+
| test           | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbot_rg/providers/Microsoft.MachineLearningServices/workspaces/test | true                |
+----------------+------------------------------------------------------------------------------------------------------------------------------------------+---------------------+

@ParthaI ParthaI self-assigned this Sep 14, 2021
@ParthaI ParthaI linked an issue Sep 14, 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.

@ParthaI as discussed, need to check if we require a custom structure or not.

@ParthaI
Copy link
Contributor Author

ParthaI commented Sep 15, 2021

@ParthaI as discussed, need to check if we require a custom structure or not.

We need custom structure I checked we are getting few attributes value as null like friendly_name, provisioning_state, creation_time, workspace_id etc..

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 a65f828 into main Sep 16, 2021
@bigdatasourav bigdatasourav deleted the issue-294 branch September 16, 2021 12:21
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_machine_learning_workspace
2 participants