Turning on Defender for IoT Hub enables threat detection, providing threat intelligence, anomaly detection, and behavior analytics for IoT Hub.
In Azure Console -
In Terraform -
References:
https://learn.microsoft.com/en-us/azure/defender-for-iot/device-builders/quickstart-onboard-iot-hub
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/iot_security_solution#enabled