I've a microservice that runs on a Azure Container Instance, and a WebApp that run on App Service. I want my WebApp to call my microservice (that is private). I've created a virtual network (v-net) with a subnet. But Azure says my two services cannot be on the same subnet because there are not delegated by the same resource. WebApp is delegated to Microsoft.Web/serverfarms and Azure Container Service is delegated to: Microsoft.ContainerInstance/containerGroups. How can I achieve what I want ? (call the microservice from the webapp ?)
Even though it's not exactly how you're trying to achieve, you can always use a message broker to decouple and enable the communication between 1-N microservices using a Service Bus Topic.
Among the benefits:
You can read more about my recommended solution:
https://microservices.io/patterns/communication-style/messaging.html
https://learn.microsoft.com/en-us/azure/architecture/microservices/design/interservice-communication
https://learn.microsoft.com/en-us/dotnet/architecture/cloud-native/service-to-service-communication