Karmile S
Karmile S

Reputation: 19

automatically create different workflows in standard logicapp using azure devops git repo and pipeline

My requirement is setup Azure DevOps which will pull the sample workflow JSON files like demo1,demo2 etc from azure git repo and deploy to already created empty logic app standard instance name pocdemo-lap. What i have done: In azure git repo i uploaded sample workflow parameter.json file and template.json file as shown in below, parameter.json file:

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "workflows_pocdemo-lap_name": {
            "value": "pocdemo-lap"

}
    }
}

template.json file:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "workflows_pocdemo-lap_name": {
            "defaultValue": "pocdemo-lap",
            "type": "String"
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.Logic/workflows",
            "apiVersion": "2017-07-01",
            "name": "[parameters('workflows_pocdemo-lap_name')]",
            "location": "centralindia",
            "properties": {
                "state": "Enabled",
                "definition": {
                    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
                    "contentVersion": "1.0.0.0",
                    "parameters": {},
                    "triggers": {
                        "manual": {
                            "type": "Request",
                            "kind": "Http",
                            "inputs": {}
                        }
                    },
                    "actions": {
                        "Initialize_variable-json": {
                            "runAfter": {},
                            "type": "InitializeVariable",
                            "inputs": {
                                "variables": [
                                    {
                                        "name": "json",
                                        "type": "integer",
                                        "value": 1
                                    }
                                ]
                            }
                        }
                    },
                    "outputs": {}
                },
                "parameters": {}
            }
        }
    ]
}

then i have created release pipeline by taking arm template deployment task as shown in below images, image.pngenter image description here

image.pngenter image description here

pipeline works fine but instead of creating workflow in my standard logicapp, pocdemo-lap. It creating consumption logicapp with the same pocdemo-lap and there i can see workflow.

I think my parameter.json and template.json is for consumption so to get my requirement what changes do i need in my parameter and template.json

Also How can i work with multiple different json files do i need to go to every time to Arm template configuration. Is there any way i can automate this for multiple files with different names.

Please correct my json files according to work with standard logicapp.

Thank you. Expecting early & detailed solution .

Upvotes: 0

Views: 308

Answers (1)

Bright Ran-MSFT
Bright Ran-MSFT

Reputation: 13574

Based on the documentation of Azure Logic Apps, it seems that the ARM template deployment method is only available for Consumption logic app.

For Standard logic app, the available deployment methods are:

enter image description here

Upvotes: 0

Related Questions