Edwin
Edwin

Reputation: 555

ARM template output gets percent-escaped

Recently our ARM template deployments are failing because the output gets percent-escaped.

We need the Logic App url as output of it's ARM template and output it as:

"outputs": {
    "url": {
      "type": "object",
      "value": {
        "key": "[concat(variables('LogicAppShortName'),'-url')]",
        "value": "[listCallbackUrl(concat(resourceId('Microsoft.Logic/workflows/', variables('LogicAppName')), '/triggers/manual'), '2016-06-01').value]"
      }
    }
  }

The ARM template output worked correctly some days/weeks ago and resulted in

...?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=...

but now it results in

...?api-version=2016-06-01&sp=%252Ftriggers%252Fmanual%252Frun&sv=1.0&sig=...

thus the %2F gets escaped again and becomes %252F, making the URL invalid.

Also, the ARM deployment shows more log lines, previously just

Updated output variable 'ArmOutputs', which contains the outputs
section of the current deployment object in string format.

now 4 lines, suggesting something has changed:

Updated output variable 'ArmOutputs.url.type', which contains the outputs section of the current deployment object in string format. 
Updated output variable 'ArmOutputs.url.value.key', which contains he outputs section of the current deployment object in string format. 
Updated output variable 'ArmOutputs.url.value.value', which contains the outputs section of the current deployment object in string format. 
Updated output variable 'ArmOutputs', which contains the outputs section of the current deployment object in string format.

Anyone any idea how to fix this bug/"feature"?

Upvotes: 0

Views: 287

Answers (1)

sj_
sj_

Reputation: 26

I have run into the same issue and fixed it by setting a new pipeline variable DECODE_PERCENTS to true.

Upvotes: 1

Related Questions