Terraform code to forward logs for every resource in a resource group to Azure monitor/log analytics with a specific retention

I need to capture logs for security compliance purposes. I need to enable log collection for any current resource and new resource in the resource group? It will have resources like keyvault, storage account, VMs, backup vault, etc.

Are there Terraform modules/ code available for each of these types of resources so that the log forwarding is made part of the automation and forwarded to either Azure monitor or log analytics workspace or a Azure storage account.