Logic Apps

Overview

The Logic App builder is used to create Azure Logic App Workflows.

  • Workflows (Microsoft.Logic/workflows)

Builder keywords

KeywordPurpose
nameSets the name of the workflow.
definitionSets the file path (via FileDefinition path) or the definition directly (via ValueDefinition value)
add_tagsAdds tags to the script runtime resource.
add_tagAdds a tag to the script runtime resource.

Example

open Farmer
open Farmer.Builders

let emptyLogicApp =
    """
    {
        "definition": {
            "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
            "actions": {},
            "contentVersion": "1.0.0.0",
            "outputs": {},
            "parameters": {},
            "triggers": {}
        },
        "parameters": {}
    }
    """

let myValueLogicApp = logicApp {
    name "value-test-logic-app"
    definition (ValueDefinition emptyLogicApp)
    add_tags [("created-by", "farmer")]
}

let filepath = "./logicAppDefinition.json"

let myFileLogicApp = logicApp {
    name "file-test-logic-app"
    definition (FileDefinition filepath)
    add_tags [("created-by", "farmer")]
}

let deployment = arm {
    location Location.NorthCentralUS
    add_resource myValueLogicApp
    add_resource myFileLogicApp
}