You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On terraform apply:
Error: creating Storage Account Management Policy: (Management Policy Name "default" / Storage Account Name "my_storage_account" / Resource Group "my_resource_group"): storage.ManagementPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidManagementPolicyRule" Message="ManagementPolicy rule Delete-after-two-months is invalid. Invalid value for parameter : blobType For more information, see - https://aka.ms/managementpolicyexamples"
Expected Behaviour
I would expect to hear from documentation or from terraform plan that this will not succeed.
prefix_match - An array of strings for prefixes to be matched.
blob_types - An array of predefined values. Valid options are blockBlob and appendBlob.
match_blob_index_tag - A match_blob_index_tag block as defined below. The block defines the blob index tag based filtering for blob objects.
"supports the following" does not indicate "if you choose filters you must specify blob_types." I don't know if this can be caught at plan time, but at the least the documentation could be improved to capture this requirement.
Thank you.
Actual Behaviour
On terraform apply:
Error: creating Storage Account Management Policy: (Management Policy Name "default" / Storage Account Name "my_storage_account" / Resource Group "my_resource_group"): storage.ManagementPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidManagementPolicyRule" Message="ManagementPolicy rule Delete-after-two-months is invalid. Invalid value for parameter : blobType For more information, see - https://aka.ms/managementpolicyexamples"
Steps to Reproduce
terraform apply above configuration
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
0.14.9
AzureRM Provider Version
2.92.0
Affected Resource(s)/Data Source(s)
azurerm_storage_management_policy
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
I would expect to hear from documentation or from terraform plan that this will not succeed.
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_management_policy says
[rule] (https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_management_policy#rule) - (Optional) A rule block as documented below.
rule supports the following:
name - (Required) A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
enabled - (Required) Boolean to specify whether the rule is enabled.
[filters] (https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_management_policy#filters) - A filter block as documented below.
actions - An actions block as documented below.
filters supports the following:
prefix_match - An array of strings for prefixes to be matched.
blob_types - An array of predefined values. Valid options are blockBlob and appendBlob.
match_blob_index_tag - A match_blob_index_tag block as defined below. The block defines the blob index tag based filtering for blob objects.
"supports the following" does not indicate "if you choose filters you must specify blob_types." I don't know if this can be caught at plan time, but at the least the documentation could be improved to capture this requirement.
Thank you.
Actual Behaviour
On terraform apply:
Error: creating Storage Account Management Policy: (Management Policy Name "default" / Storage Account Name "my_storage_account" / Resource Group "my_resource_group"): storage.ManagementPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidManagementPolicyRule" Message="ManagementPolicy rule Delete-after-two-months is invalid. Invalid value for parameter : blobType For more information, see - https://aka.ms/managementpolicyexamples"
Steps to Reproduce
terraform apply above configuration
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: