-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
New features in azurerm_storage_management_policy
#11163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @yupwei68
Thanks for this PR.
Taking a look through there appears to be a large number of breaking changes in this PR which'll need to be reverted for us to merge this prior to 3.0, is there a reason we've changed these from integers to floats?
Thanks!
azurerm/internal/services/storage/storage_management_policy_data_source.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/storage_management_policy_data_source.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/storage_management_policy_data_source.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/storage_management_policy_data_source.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/storage_management_policy_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/storage_management_policy_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/storage_management_policy_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/storage_management_policy_resource_test.go
Outdated
Show resolved
Hide resolved
Hi Tom, thanks for your comments. I've reverted the breaking changes. Changes have been pushed. Tests have passed. Please continue reviewing. |
I've reverted all the breaking changes. |
@yupwei68, @tombuildsstuff , @katbyte can we have an ETA / status on this ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yupwei68 - aside from one comment left inline about a failing test i think this looks good
@@ -53,6 +53,29 @@ func dataSourceStorageManagementPolicy() *schema.Resource { | |||
Elem: &schema.Schema{Type: schema.TypeString}, | |||
Set: schema.HashString, | |||
}, | |||
|
|||
"match_blob_index_tag": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this another "not yet in global property?"
------- Stdout: -------
=== RUN TestAccStorageManagementPolicy_blobIndexMatch
=== PAUSE TestAccStorageManagementPolicy_blobIndexMatch
=== CONT TestAccStorageManagementPolicy_blobIndexMatch
testing.go:620: Step 3/6 error: Error running apply: exit status 1
Error: creating Azure Storage Management Policy "/subscriptions/*******/resourceGroups/acctestRG-storage-210426173350412751/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acctu9ru0": storage.ManagementPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Tag based filtering is not supported for the account."
on terraform_plugin_test.tf line 30, in resource "azurerm_storage_management_policy" "test":
30: resource "azurerm_storage_management_policy" "test" {
--- FAIL: TestAccStorageManagementPolicy_blobIndexMatch (212.08s)
FAIL
------- Stderr: -------
2021/04/26 17:33:49 [DEBUG] not using binary driver name, it's no longer needed
2021/04/26 17:33:50 [DEBUG] not using binary driver name, it's no longer needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. It is released globally. It needs enabled the feature in the subscription. https://azure.microsoft.com/en-us/blog/manage-and-find-data-with-blob-index-for-azure-storage-now-in-preview/. I've added this into the doc, here https://github.com/terraform-providers/terraform-provider-azurerm/pull/11163/files#diff-26c23fcfb7ed0a7939dcabd4959f025c9c94e7fbe5a618c5c13e90462358a09bR108
Hi kt, thanks for comments. Please enable the feature in the subscription and retry the tests. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that worked @yupwei68! thanks, LGTM now 👍
This has been released in version 2.57.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.57.0"
}
# ... other configuration ... |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fix: #9617
#10399
resource:
=== RUN TestAccStorageManagementPolicy_basic
=== PAUSE TestAccStorageManagementPolicy_basic
=== CONT TestAccStorageManagementPolicy_basic
--- PASS: TestAccStorageManagementPolicy_basic (171.66s)
=== RUN TestAccStorageManagementPolicy_singleAction
=== PAUSE TestAccStorageManagementPolicy_singleAction
=== CONT TestAccStorageManagementPolicy_singleAction
--- PASS: TestAccStorageManagementPolicy_singleAction (172.81s)
=== RUN TestAccStorageManagementPolicy_singleActionUpdate
=== PAUSE TestAccStorageManagementPolicy_singleActionUpdate
=== CONT TestAccStorageManagementPolicy_singleActionUpdate
--- PASS: TestAccStorageManagementPolicy_singleActionUpdate (235.65s)
=== RUN TestAccStorageManagementPolicy_multipleRule
=== PAUSE TestAccStorageManagementPolicy_multipleRule
=== CONT TestAccStorageManagementPolicy_multipleRule
--- PASS: TestAccStorageManagementPolicy_multipleRule (172.52s)
=== RUN TestAccStorageManagementPolicy_updateMultipleRule
=== PAUSE TestAccStorageManagementPolicy_updateMultipleRule
=== CONT TestAccStorageManagementPolicy_updateMultipleRule
--- PASS: TestAccStorageManagementPolicy_updateMultipleRule (237.07s)
=== RUN TestAccStorageManagementPolicy_blobTypes
=== PAUSE TestAccStorageManagementPolicy_blobTypes
=== CONT TestAccStorageManagementPolicy_blobTypes
--- PASS: TestAccStorageManagementPolicy_blobTypes (171.88s)
=== RUN TestAccStorageManagementPolicy_blobIndexMatch
=== PAUSE TestAccStorageManagementPolicy_blobIndexMatch
=== CONT TestAccStorageManagementPolicy_blobIndexMatch
--- PASS: TestAccStorageManagementPolicy_blobIndexMatch (347.53s)
=== RUN TestAccStorageManagementPolicy_complete
=== PAUSE TestAccStorageManagementPolicy_complete
=== CONT TestAccStorageManagementPolicy_complete
--- PASS: TestAccStorageManagementPolicy_complete (171.03s)
=== RUN TestAccStorageManagementPolicy_update
=== PAUSE TestAccStorageManagementPolicy_update
=== CONT TestAccStorageManagementPolicy_update
--- PASS: TestAccStorageManagementPolicy_update (364.83s)
PASS
data source:
=== RUN TestAccDataSourceStorageManagementPolicy_basic
=== PAUSE TestAccDataSourceStorageManagementPolicy_basic
=== CONT TestAccDataSourceStorageManagementPolicy_basic
--- PASS: TestAccDataSourceStorageManagementPolicy_basic (161.02s)
=== RUN TestAccDataSourceStorageManagementPolicy_blobTypes
=== PAUSE TestAccDataSourceStorageManagementPolicy_blobTypes
=== CONT TestAccDataSourceStorageManagementPolicy_blobTypes
--- PASS: TestAccDataSourceStorageManagementPolicy_blobTypes (158.81s)
PASS