App service authentication to Application Insights through RBAC in Terraform
I am trying to eliminate using connection strings in my azure infra that is created using terraform. I am planning to assign specific rbac roles to resources like web app, function app etc to make them connect to Keyvault, storage account, cosmos db etc. How to do the same for Application insights? if i grant Application Insights Component Contributor to the managed identity of the app service, how do i point it to which application insights it should connect to? is using APPINSIGHTS_INSTRUMENTATIONKEY
or connection string mandatory here? or can i pass this somewhere azurerm_application_insights.example.app_id
?