FYI - not sure if this is an Azure or Terraform issue; however, it appears that you cannot specify 0 days for the
base_blob {
tier_to_archive_after_days_since_modification_greater_than = 0
}
It fails with the below error message; setting it to 1 does work but it is not ideal for our situation.
Error:
Error: Error creating Azure Storage Management Policy “/subscriptions/xxxxxxxxxxxxxxxxxx/resourceGroups/data-rg/providers/Microsoft.Storage/storageAccounts/datashareddevarchive”: storage.ManagementPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 – Original Error: autorest/azure: Service returned an error. Status=400 Code=“InvalidManagementPolicyRule” Message="ManagementPolicy rule archiverule is invalid. Invalid value for parameter : baseBlob"
on storage.tf line 143, in resource “azurerm_storage_management_policy” “archive_storage”:
143: resource “azurerm_storage_management_policy” “archive_storage” {
Karl
Note: It can be set to 0 using the UI successfully