Using Managed Identity on Logic App consumption

Table of Contents
Problem Statement
When deploying an Azure Logic App Consumption workflow, securely connecting to other Azure services using Managed Identity can be challenging, especially with Terraform which lacks direct support for setting up API connections with Managed Identity.
Solution
To overcome this limitation, we can use a combination of Terraform, Azure API, and ARM templates to deploy Logic App Consumption workflows with Managed Identity authentication for secure connections to Azure services.
Implementation
Create Resource Group
Create a resource group to organize and manage resources efficiently.
Set Up a Storage Account and Queue
Configure a storage account and queue for storing data and messages securely.
Create an API Connection with Managed Identity
Establish an API connection with Managed Identity to enable secure authentication for Logic App Consumption.
Deploy Logic App Consumption Using ARM Template
Deploy Logic App Consumption using ARM template to work around Terraform's limitations and define the Logic App body.
Role Assignment for Managed Identity
Assign roles to the Managed Identity to ensure appropriate access permissions.
Extract the Callback URL for the Logic App Trigger (Optional)
Retrieve the unique path URL for integrating Logic App triggers when needed.
Conclusion
By leveraging Managed Identity in Logic App Consumption workflows, we achieved enhanced security and scalability, paving the way for a robust and future-proof authentication solution. This experience highlighted the importance of thoughtful architecture in building secure and maintainable systems ready for future growth.