-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_security_center_storage_defender
Support for explicitly setting is_enabled
#27350
azurerm_security_center_storage_defender
Support for explicitly setting is_enabled
#27350
Comments
Hi @audunsolemdal thanks for opening this issue. I would like to explain that Terraform performs CRUD management on Azure resources through the Azure rest API. For the behavior of this API, once Therefore, for your case, could you try to remove the resource |
Ok, important detail, thanks.
I could, but this sounds like a hassle to do reliably at scale since I don't use this resource already. I think I will rather try using the azapi_update_resource or perhaps a script is better suited given the 404 behavior. |
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. |
Is there an existing issue for this?
Community Note
Description
My org currently deploys Defender for Storage at multiple subscriptions via Azure Policy using the MDFC classic per transaction storage plan. The classic plan will be unsupported for new subscriptions in a few months, and the new plan costs $10 minimum per month. Ideally we would have preferred a per-transaction model, but I am now planning to disable MDFC for specific storage accounts.
From what I can tell the current logic of
azurerm_security_center_storage_defender
is implicit when it comes to setting theIsEnabled
property. I believe it is implicitly settrue
when created, and implicitly set tofalse
when the resource is removed(?)For my use case it would be optimal to support setting both these settings at the same time
New or Affected Resource(s)/Data Source(s)
azurerm_security_center_storage_defender
Potential Terraform Configuration
References
https://learn.microsoft.com/en-us/azure/defender-for-cloud/advanced-configurations-for-malware-scanning#override-defender-for-storage-subscription-level-settings
https://learn.microsoft.com/en-us/azure/defender-for-cloud/advanced-configurations-for-malware-scanning#rest-api
https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-storage-classic-migrate#impact-on-the-defender-for-storage-classic-per-transaction-plan
The text was updated successfully, but these errors were encountered: