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_storage_share_file closes #455 #464

Merged
merged 4 commits into from
Apr 5, 2022
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Apr 1, 2022

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

PRETEST: tests/azure_storage_share_file

TEST: tests/azure_storage_share_file
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 4s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest15836]
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 32s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest15836/providers/Microsoft.Storage/storageAccounts/turbottest15836]
azurerm_storage_share.named_test_resource: Creating...
azurerm_storage_share.named_test_resource: Creation complete after 2s [id=https://turbottest15836.file.core.windows.net/turbottest15836]
azurerm_storage_share_file.named_test_resource: Creating...
azurerm_storage_share_file.named_test_resource: Creation complete after 2s [id=https://turbottest15836.file.core.windows.net/turbottest15836//turbottest15836]

Warning: Deprecated Resource

  on variables.tf line 31, in data "null_data_source" "resource":
  31: data "null_data_source" "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: 4 added, 0 changed, 0 destroyed.

Outputs:

resource_aka = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest15836/providers/Microsoft.Storage/storageAccounts/turbottest15836/fileServices/default/shares/turbottest15836
resource_aka_lower = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest15836/providers/microsoft.storage/storageaccounts/turbottest15836/fileservices/default/shares/turbottest15836
resource_id = /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest15836/providers/Microsoft.Storage/storageAccounts/turbottest15836/fileServices/default/shares/turbottest15836
resource_name = turbottest15836

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest15836/providers/Microsoft.Storage/storageAccounts/turbottest15836/fileServices/default/shares/turbottest15836",
    "name": "turbottest15836",
    "storage_account_name": "turbottest15836"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest15836/providers/Microsoft.Storage/storageAccounts/turbottest15836/fileServices/default/shares/turbottest15836",
    "name": "turbottest15836"
  }
]
✔ 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/turbottest15836/providers/Microsoft.Storage/storageAccounts/turbottest15836/fileServices/default/shares/turbottest15836",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest15836/providers/microsoft.storage/storageaccounts/turbottest15836/fileservices/default/shares/turbottest15836"
    ],
    "title": "turbottest15836"
  }
]
✔ PASSED

POSTTEST: tests/azure_storage_share_file

TEARDOWN: tests/azure_storage_share_file

SUMMARY:

1/1 passed.

Example query results

Results
select
  name,
  storage_account_name,
  type,
  access_tier,
  share_quota,
  enabled_protocols
from
  azure_storage_share_file;
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------+-------------------+
| name                                                | storage_account_name | type                                                  | access_tier          | share_quota | enabled_protocols |
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------+-------------------+
| cs-partha-turbotad-onmicrosoft-com-1003200052b74987 | csg1003200052b74987  | Microsoft.Storage/storageAccounts/fileServices/shares | TransactionOptimized | 6           | SMB               |
| test1                                               | tetsg8900000         | Microsoft.Storage/storageAccounts/fileServices/shares | TransactionOptimized | 512         | SMB               |
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------+-------------------+

 select
  name,
  storage_account_name,
  type,
  access_tier,
  share_quota,
  enabled_protocols
from
  azure_storage_share_file
where
  type = 'Microsoft.Storage/storageAccounts/fileServices/shares';
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------+-------------------+
| name                                                | storage_account_name | type                                                  | access_tier          | share_quota | enabled_protocols |
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------+-------------------+
| cs-partha-turbotad-onmicrosoft-com-1003200052b74987 | csg1003200052b74987  | Microsoft.Storage/storageAccounts/fileServices/shares | TransactionOptimized | 6           | SMB               |
| test1                                               | tetsg8900000         | Microsoft.Storage/storageAccounts/fileServices/shares | TransactionOptimized | 512         | SMB               |
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------+-------------------+
select
  name,
  storage_account_name,
  type,
  access_tier,
  access_tier_change_time,
  share_quota,
  enabled_protocols
from
  azure_storage_share_file
where
  access_tier = 'TransactionOptimized';
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------------------+-------------+-----
| name                                                | storage_account_name | type                                                  | access_tier          | access_tier_change_time | share_quota | enab
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------------------+-------------+-----
| cs-partha-turbotad-onmicrosoft-com-1003200052b74987 | csg1003200052b74987  | Microsoft.Storage/storageAccounts/fileServices/shares | TransactionOptimized | <null>                  | 6           | SMB 
| test1                                               | tetsg8900000         | Microsoft.Storage/storageAccounts/fileServices/shares | TransactionOptimized | <null>                  | 512         | SMB 
+-----------------------------------------------------+----------------------+-------------------------------------------------------+----------------------+-------------------------+-------------+-----

select
  name,
  storage_account_name,
  type,
  access_tier,
  access_tier_change_time,
  share_quota,
  enabled_protocols
from
  azure_storage_share_file
order by share_quota desc limit 1;
+-------+----------------------+-------------------------------------------------------+----------------------+-------------------------+-------------+-------------------+
| name  | storage_account_name | type                                                  | access_tier          | access_tier_change_time | share_quota | enabled_protocols |
+-------+----------------------+-------------------------------------------------------+----------------------+-------------------------+-------------+-------------------+
| test1 | tetsg8900000         | Microsoft.Storage/storageAccounts/fileServices/shares | TransactionOptimized | <null>                  | 512         | SMB               |
+-------+----------------------+-------------------------------------------------------+----------------------+-------------------------+-------------+-------------------+

@ParthaI ParthaI self-assigned this Apr 1, 2022
@ParthaI ParthaI linked an issue Apr 1, 2022 that may be closed by this pull request
Co-authored-by: souravTurbot <78197905+bigdatasourav@users.noreply.github.com>
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 61f34d1 into main Apr 5, 2022
@bigdatasourav bigdatasourav deleted the issue-455 branch April 5, 2022 05:51
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_storage_share_file
2 participants