- Print
- Comment
- DarkLight
- PDF
Step 22 - Replace Tokens in Logic App Parameters file - Build
Article summary
Did you find this summary helpful?
Thank you for your feedback!
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:
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?