I am trying my hand at IaC using Pulumi. I am able to create storage accounts but not enable Azure defender to them. How do I add Azure Defender to identify security threats on my storage accounts?
You should use the security.AdvancedThreatProtection
resource, for example:
const advancedThreatProtection = new azure_native.security.AdvancedThreatProtection("advancedThreatProtection", {
isEnabled: true,
resourceId: storageAccount.id,
settingName: "current",
});
Also, see a full runnable example.