Step 22 - Replace Tokens in Logic App Parameters file - Build
  • 18 Nov 2019
  • 1 Minute to read
  • Contributors
  • Comment
  • Dark
    Light
  • PDF

Step 22 - Replace Tokens in Logic App Parameters file - Build

  • Comment
  • Dark
    Light
  • PDF

Article summary

In this task I am pointing to the Logic App parameters file and running the replace tokens task over it. It is also possible to override tokens in the Logic App deploy task but I found that in practice the challenge with that 2nd approach was if I got settings wrong I wasnt able to troubleshoot very easily what the settings that were used were. Based on this I decided to change and use a template file for the parameters which contains tokens. I would then replace the tokens with values from the pipeline variables. If I need to troubleshoot I can choose to include this file in the pipeline artifacts so I can download and troubleshoot it.

A picture of the configuration of this task is below:

image.png

YAML

Below is the yaml for this task:

steps:
- task: qetza.replacetokens.replacetokens-task.replacetokens@3
  displayName: 'Replace tokens in LogicApp.parameters.template.json'
  inputs:
    rootDirectory: '$/LogicApps'
    targetFiles: LogicApp.parameters.template.json
    tokenPrefix: '__'
    tokenSuffix: '__'


Was this article helpful?