I have a Azure keyvault defined with secrets which i can access in devops build pipeline using "Azure KeyVault" task. Now i need to pass the secret variable to python inline script.
Since it is encrypted, python cannot read the value directly. How can i decrypt and pass them. The secret holds Databricks Access token. We are trying to create Databricks cluster using DevOps pipeline.
My Yaml has following tasks
- Azure KeyVault
- Powershell to convert secret to variable - https://github.com/Microsoft/azure-pipelines-tasks/issues/8345
- Python inline script with argument. For the arguement, i tried with actual secret name as $(secretname) and it printed ***. Then i tried converting to refer the environment variable created in powershell and python passed the variable name as is.
I tried the following.
Use powershell to convert from secrets to environment variable. I tried to first convert secret to variable using this link - https://github.com/Microsoft/azure-pipelines-tasks/issues/8345 . When called in python as arguement, instead of passing the secret value it passed the name of the variable with the $ symbol inside python.
We do not want to use variable groups due to some restrictions
Edit: Updated to add more details.