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

Fix azure_storage_queue Queue is not supported for the storage account closes #458 #467

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Apr 4, 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_queue []

PRETEST: tests/azure_storage_queue

TEST: tests/azure_storage_queue
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/turbottest91393]
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 35s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest91393/providers/Microsoft.Storage/storageAccounts/turbottest91393]
azurerm_storage_queue.named_test_resource: Creating...
azurerm_storage_queue.named_test_resource: Creation complete after 0s [id=https://turbottest91393.queue.core.windows.net/turbottest91393]

Warning: Deprecated Resource

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

Outputs:

resource_aka = azure://https://turbottest91393.queue.core.windows.net/turbottest91393
resource_aka_lower = azure://https://turbottest91393.queue.core.windows.net/turbottest91393
resource_id = /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest91393/providers/Microsoft.Storage/storageAccounts/turbottest91393/queueServices/default/queues/turbottest91393
resource_name = turbottest91393
subscription_id = d46d7416-f95f-4771-bbb5-529d4c76659c

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

Running SQL query: test-hydrate-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest91393/providers/Microsoft.Storage/storageAccounts/turbottest91393/queueServices/default/queues/turbottest91393",
    "metadata": {},
    "name": "turbottest91393",
    "storage_account_name": "turbottest91393",
    "type": "Microsoft.Storage/storageAccounts/queueServices/queues"
  }
]
✔ PASSED

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

POSTTEST: tests/azure_storage_queue

TEARDOWN: tests/azure_storage_queue

SUMMARY:

1/1 passed.

Example query results

Results

Before Fix

> select * from azure_storage_queue
Error: storage.QueueClient#List: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Queue is not supported for the account." (SQLSTATE HV000)

After Fix

> select * from azure_storage_queue
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-
| name  | id                                                                                                                                                                       | storage_account_name | 
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-
| test2 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbot_rg/providers/Microsoft.Storage/storageAccounts/tetsg8900000/queueServices/default/queues/test2 | tetsg8900000         | 
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-

@ParthaI ParthaI requested a review from bigdatasourav April 4, 2022 09:10
@ParthaI ParthaI linked an issue Apr 4, 2022 that may be closed by this pull request
@ParthaI ParthaI self-assigned this Apr 5, 2022
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 892d4a8 into main Apr 5, 2022
@bigdatasourav bigdatasourav deleted the issue-458 branch April 5, 2022 05:45
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.

Fix azure_storage_queue Queue is not supported for the storage account
2 participants