EDIT (21/07/23): Added YouTube video (https://youtu.be/BjI4OlNKfh4) to show this process.
Coming from Power Platform world, I am used to complex deployments i.e. Managed Solutions. But when I first started doing Azure, I had to deal with ARM Templates, which is a whole different kind of monster. Just like Managed Solutions, ARM is not easy to start with for a beginner. ARM JSON is messy enough and to this add Logic Apps JSON and you can only describe it as torture to put it mildly.

Azure is part of my day job, but Power Platform and Dynamics 365 is still my core focus, so I never bothered to dive deep into Pulumi or Terraform. When Microsoft announced Bicep, I was so excited because it is not third-party and it looks like a normal programming language + no state files. Both the language and the tooling around it is amazing, so when I deploy to Azure these days, Bicep is the language I write IaaC.
The next level of evolution for deploying into Azure is Azure Developer CLI. If you haven’t heard about Azure Developer CLI (azd) or haven’t used it yet, you can watch this video from Scott Hanselman and Savannah Ostrowski (https://www.youtube.com/watch?v=VTk-FhJyo7s) to get an overview.
The aim of this tool to make both resource provisioning, code deployment or cleanup seamless with a single command e.g. az up, az down. I prefer Logic Apps over Power Automate because I find it more robust than Power Automate. So, I found that there was no template in awesome azd site to show Logic Apps Standard + Dataverse I thought I will give it a shot, as it will be a learning experience for me as well.
Below is the architecture of the Bicep template.

The easier option would be to run this in Dev Container or GitHub Codespaces as you don’t need to install anything locally. You can do this on the GitHub repo itself.

But if you want to do it the traditional way you’ll need to install the tools on your local machine. These are the tools you would need
I have also added all the VSCode extensions that are needed in the repo in extensions.json, so you would get prompted by VSCode if you don’t have any of these extensions.

If you are running in Dev Containers all these extensions would be installed automatically.
In terms of security this template has the following:
- Bearer Token for Logic Apps invocation using Easy Auth. This is checked in the Workflow itself
- Storage Account <-> Logic Apps via VNet
You can instantiate the template using this azd command
azd init -t rajyraman/azd-logicapps-dataverse
The next step is to create the configurations for various environment. You can do this by running
azd env new azd-logicapps-dataverse-dev
This creates a config folder for dev deployment in this example.
Below is a sample env file in my machine.
ALLOWED_LOCATIONS="australiaeast,australiasoutheast"
AZURE_ENV_NAME="azd-logicapps-dataverse-dev"
AZURE_LOCATION="australiaeast"
DATAVERSE_APPLICATION_ID="21483d08-e0d9-4b87-be38-4f46e41abbe1"
DATAVERSE_APPLICATION_SECRET="Y"
DATAVERSE_URL="https://xyz.crm6.dynamics.com"
APPLICATIONINSIGHTS_CONNECTION_STRING, AZURE_SUBSCRIPTION_ID, FUNCTIONS_NAME and AZURE_TENANT_ID will be added automatically by azd when you provision the environment because you need to run azd auth login before you start provisioning anything in Azure.
The sample Logic Apps Standard workflow has only one connection to Dataverse, so if there are additional connections to different connectors these have to be added in into connections.json. The good thing about Logic Apps Standard is that you can build and test the workflow entirely in VSCode locally. I love this feature.
All the instructions are in the repo at https://github.com/rajyraman/azd-logicapps-dataverse, so I hope this template helps you with Dataverse + Logic Apps integration.
References
- https://github.com/pamelafox/fastapi-azure-function-apim
- https://github.com/Azure-Samples/function-app-arm-templates
- https://github.com/marnixcox/logicapp-standard-func
- https://techcommunity.microsoft.com/t5/integrations-on-azure-blog/trigger-workflows-in-standard-logic-apps-with-easy-auth/ba-p/3207378
- https://www.youtube.com/watch?v=tawHXz6qGQI
- https://github.com/Azure/azure-dev