How to access variable group value by string name in azure pipelines?

29 Views Asked by At

I have a variable group where we are keeping all the secret values. In our azure devops pipeline, we want to give user option to provide name of the variable and we will use that value from the variable group.

I know that in pipeline, we use below line to access all variables from a variable group

variables:
  - group: Team-Group-Secrets

but i need to access a variable by name. we ask parameter from user, let's say - secretVarName. I want to get secret value for that variable name, but i could not find the right syntax or way to do it. I also tried this: ${{ variables.$(secretVarName) }}, but it is not working.

This question is also not related to my question: Dynamic variable group in azure

0

There are 0 best solutions below