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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and AzureRM Provider) Version
Terraform version: v1.0.0
AzureRM Provider version: v2.71.0
Affected Resource(s)
azurerm_storage_management_policy
Terraform Configuration Files
provider"azurerm" {
features {}
}
resource"azurerm_resource_group""example" {
name="example-resource-group"location="centralus"
}
resource"azurerm_storage_account""example" {
name="jneafknzeae"# Random name for demo purposesresource_group_name=azurerm_resource_group.example.namelocation=azurerm_resource_group.example.locationaccount_kind="StorageV2"account_tier="Standard"access_tier="Hot"account_replication_type="LRS"enable_https_traffic_only=truemin_tls_version="TLS1_2"allow_blob_public_access=false
}
resource"azurerm_storage_management_policy""example" {
storage_account_id=azurerm_storage_account.example.idrule {
name="Example-Rule"enabled=truefilters {
blob_types=["blockBlob"]
}
actions {
base_blob {
delete_after_days_since_modification_greater_than=30
}
}
}
}
Debug Output
Panic Output
Expected Behaviour
A drift is properly detected and the Storage Account / policy are recreated.
Actual Behaviour
Terraform plan fails with:
│ Error: storage.ManagementPoliciesClient#Get: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/jneafknzeae' under resource group 'example-resource-group' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
│
│ with azurerm_storage_management_policy.example,
│ on main.tf line 23, in resource "azurerm_storage_management_policy" "example":
│ 23: resource "azurerm_storage_management_policy" "example" {
Since plan fails, we are unable to recreate the Storage Account.
Steps to Reproduce
terraform apply the above configuration
Go into the Azure portal and manually delete the Storage Account (or use the CLI, etc.)
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.
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_storage_management_policy
Terraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
A drift is properly detected and the Storage Account / policy are recreated.
Actual Behaviour
Terraform plan fails with:
Since plan fails, we are unable to recreate the Storage Account.
Steps to Reproduce
terraform apply
the above configurationterraform plan
the above configurationImportant Factoids
References
The text was updated successfully, but these errors were encountered: