jeffhollan / LogicAppTemplateCreator

Script to convert Logic Apps into templates for deployment
MIT License
143 stars 74 forks source link

httpTriggerUrl gets wrong URL upon extraction #96

Closed ghost closed 3 years ago

ghost commented 3 years ago

I've noticed an anomaly in the extraction of the httpTriggerUrl object when using a HTTP trigger.

This is what we deploy:


  "outputs": {
    "httpTriggerUrl": {
      "type": "string",
      "value": "[listCallbackURL(concat(resourceId(resourceGroup().name,'Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/request'), '2016-06-01').value]"
    }
  }

If I extract it again after deploy, this is what I get:

  "outputs": {
    "httpTriggerUrl": {
      "type": "string",
      "value": "[listCallbackURL(concat(resourceId(resourceGroup().name,'Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]"
    }
  }

Please notice the change of '/triggers/request' to '/triggers/manual'. The workaround so far is to manually replace the 'manual' route with 'request', before commit.

MLogdberg commented 3 years ago

Thanks for reporting! This should be fixed now and a new version should be up release to PowerShell Gallery now, please test and verify. Thanks!

ghost commented 3 years ago

Hi! Hi! I just updated to 1.0.25 1.0.25 LogicAppTemplate PSGallery Logic App Template creator script) and from what I can see the problem still exists.

From LA Designer in Azure portal, code view:

        "triggers": {
            "request": {
                "inputs": {
                    "schema": {}
                },
                "kind": "Http",
                "type": "Request"
            }
        }

In the PS output:

"outputs": {
    "httpTriggerUrl": {
      "type": "string",
      "value": "[listCallbackURL(concat(resourceId(resourceGroup().name,'Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]"
    }
  }
MLogdberg commented 3 years ago

This is solved, open if not agreeing :)