Im trying to enable malware scanning using "Microsoft Defender for Storage" on a Storage Account using terraform, but im not able to find out how to do it. Is it not supported in Terraform? Im trying to enable the "On-upload malware scanning" option on the "Microsoft Defender For Cloud". Are there any other means of programatically doing this (if its not yet supported in Terraform)?
2
Answers
This is how I resolved it using ARM template. In the resource definition, the "template_body" reference the template body file "malware-scan-configuration.json"
template body file: malware-scan-configuration.json
Try this (azapi provider needed):
Note: you may need to tweak it to be an update_resource (put operation) if you’ve already got settings defined on the resource (tf will tell you the resource already exists and needs importing):