Logic app trigger in terraform

Hi ,

I am trying to replicate this example in terraform Invoking batch endpoints from Event Grid events in storage - Azure Machine Learning | Microsoft Learn

Does anyone know how to create the resource When a resource event occurs ?

I tried using azurerm_logic_app_trigger_custom but it give the error to provide a type but it is going to be trigger by event grid