Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Azure Logic Apps with Terraform, what are the limitations?

For what I can understand one can build Logic Apps with Terraform. However, the docs are still not very good, and it looks like this feature is pretty new.

What are the limitations when it comes to TF and Azure Logic Apps? Are there any?

I want to build a two apps, one that is triggered every month and another that is triggered by a https request. I want these then to run two python scripts, and I want the later one to return the result from this script to the client that called the https.

Is this possible to automate in Terraform? At this moment, there are very little examples and documentation on this. Any comment or tip is helpful and greeted with open arms!

like image 994
NorwegianClassic Avatar asked Sep 18 '18 21:09

NorwegianClassic


People also ask

How long can Logic apps run?

In the designer, the same setting controls the maximum number of days that a workflow can run and for keeping run history in storage. For the multi-tenant service, the 90-day default limit is the same as the maximum limit.

What are the advantages of Azure logic apps?

Azure Logic Apps simplifies the way that you connect legacy, modern, and cutting-edge systems across cloud, on premises, and hybrid environments and provides low-code-no-code tools for you to develop highly scalable integration solutions for your enterprise and business-to-business (B2B) scenarios.

Are logic apps scalable?

Logic Apps can scale depending on the connector(s) you use, for instance, the File System connector current limit of 100 calls per minute. Like Logic Apps, Azure Functions can run under a consumption plan – instances of the Azure Functions host are dynamically added and removed based on the number of incoming events.


1 Answers

You can create a blank Logic App instance through Terrform (TF). But, if you want to add triggers and actions, I wouldn't recommend using TF at all, as of the provider version of 1.20.0.

  1. TF lacks document around parameters. As you know there are two parameters properties – right under the properties property and right under the definitions property. This document states parameters but it doesn't clearly say which one. I'm guessing this refers to the one under the definitions property, but it actually doesn't work – throws Invalid Template error without enough explanation.

    UPDATE: I just reverse engineered by importing a Logic App instance using terraform import. The parameters is actually pointing to the one under the properties property. However, it still doesn't work as the Logic App's parameter value can be anything – object, string, integer, etc, while TF's parameter expects string only. Also, there is no way to create parameters under the definitions property.

  2. TF only supports two triggers – HTTP trigger and Timer trigger. All other triggers should use the azurerm_logic_app_trigger_custom resource, but it requires the body part to manually write a JSON object or import from a file, which can't be parameterised through variables or locals.

  3. TF only supports one action – HTTP action. All other actions should use the azurerm_logic_app_action_custom resource, but, like the same issue above, it's not that useful.

In conclusion, TF lacks supports parameters, triggers and actions. So, unless you just create a blank Logic App instance, TF wouldn't be an option for Logic Apps. If you still want to create a blank Logic App instance with TF, then I would recommend this approach using Azure PowerShell or Azure CLI.

like image 152
justinyoo Avatar answered Sep 30 '22 16:09

justinyoo