Open bpriyas92 opened 1 year ago
If you look at the error it says version
is the incorrect field. You can't declare a block with default values.
You can work around it by wrapping base_blob
, version
and snapshot
as a dynamic block so it's only included when there's defined values.
Is there an existing issue for this?
Community Note
Terraform Version
Terraform v1.3.0
AzureRM Provider Version
v3.49.0
Affected Resource(s)/Data Source(s)
azurerm_storage_management_policy
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
To Deploy policy since version is optional
Actual Behaviour
terraform apply failed with above error
Steps to Reproduce
name = "rule2" enabled = true filters ={ blob_types = ["blockBlob"] } actions ={ base_blob ={ tier_to_cool_after_days_since_modification_greater_than = 10 tier_to_archive_after_days_since_modification_greater_than = 50 delete_after_days_since_modification_greater_than = 100 } snapshot ={ delete_after_days_since_creation_greater_than = 30 } }
Important Factoids
No response
References
No response