Setting defender settings for storage account via bicep does not work

Sabine Seljeseth 0 Reputation points
2024-10-18T10:43:34.2733333+00:00

I have included the following in my bicep in order to use Microsoft defender for cloud for my storage account (see code below). The pipeline that deploys the resources in azure goes through without issues and Microsoft defender for cloud gets enabled. The issue is that it does not seem to turn on malware scanning and sensitive data discovery which is also set in the bicep file. Has anyone experienced the same?


resource defenderForStorageSettings 'Microsoft.Security/DefenderForStorageSettings@2022-12-01-preview' = {
  name: 'current'
  scope: storageaccountname
  properties: {
    isEnabled: true
    malwareScanning: {
      onUpload: {
        isEnabled: true
        capGBPerMonth: 100
      }
    }
    sensitiveDataDiscovery: {
      isEnabled: true
    }
    overrideSubscriptionLevelSettings: true
  }
}
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,183 questions
Microsoft Defender for Cloud
Microsoft Defender for Cloud
An Azure service that provides threat protection for workloads running in Azure, on-premises, and in other clouds. Previously known as Azure Security Center and Azure Defender.
1,392 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.