Automate Deployment of Azure Standard Logic App

I would like to automate the deployment of a standard Azure logic app that does the following…

  • Starts with a reoccurrence trigger (this i know how to do)
  • Using a “sql connector” (think I should use a built-in connector as the logic app is using vnet integration) connect to an Azure sql database and execute a simple “sql select” query.
  • The query will be executed using the ‘user assigned managed identity’ of the logic app which will be created as login in the database with “db_datareader” perms.

I am looking for a example or tutorial on how to Terraform the above…

Hi @ian.carrick,

Unlike with logic apps consumption, logic apps standard separates the platform/infrastructure elements from the code elements.

What I mean by this is that with logic apps consumption you deploy a workflow and this workflow creates the logic app “infrastructure” underneath which is invisible and indivisible from the workflow and is a 1:1 relationship. However, with Logic Apps standard you create the logic app - which is the platform/infrastructure on which the workflows are then deployed to. This is a 1:n relationship.

In this scenario you have the following:

Terraform deploys and manages:

  1. The App service plan
  2. The logic app storage account (This is the same as an azure function storage account)
  3. The Logic App Standard resource
  4. Managed API connections (These are a whole other discussion and come with their own gotchas for managing in Terraform) and their connection access policies
  5. Application Insights
  6. Managed Identities
  7. Other resources (keyvaults, storage accounts, sql, etc)
  8. RBAC on the other resources for the Managed Identities

The workflows are then deployed to the Logic app as a code project and consist of:

  1. The Workflows (which define the triggers)
  2. connections.json which defines the built-in connections and the metadata to link managed api connections
  3. host.json
  4. Artifacts
  5. other stuff that is not immediately relevant.

Check the following for more detailed information (Although it is not Terraform specific it documents the above split in a lot more detail:

I have spent a lot of time working in this area with Terraform and Devops (LogicAPps Standard, Managed APIs, deployments etc.) and can certainly assist you in coming up with an end-to-end solution. But it is important that you understand that Terraform is not used to manage the workflows or triggers in LogicApps standard, only the platform elements. And you will have to delve into code deployment methods in addition to pure Terraform.

I’m happy for you to message me directly me via this platform, initially, so we don’t clutter this thread with a whole lot of noise and then we can come back with more ‘actionable’ examples for the community to digest.

Hello @ExtelligenceIT
I have similar query but some more adjustments are needed in my requirements, how do i connect with you to so we don’t clutter this thread?