5

We need to create and Key Vault and populate it (or generate) with secrets, then reference them as passwords to SQL servers (PaaS) at the next build step. What would be the best approach to do that?

WinBoss
  • 879
  • 1
  • 17
  • 40

1 Answers1

3

There are many ways to create/update Azure Key Vault, such as Azure PowerShell, Azure CLI, REST API, also there are Azure PowerShell and Azure CLI tasks in VSTS build/release. So do it with Azure PowerShell or Azure CLI.

To create/update the variable in build/release, you can use Logging Command (##vso[task.setvariable]value), then the variable can be used in subsequent task.

On the other hand, if you just want the variable secret, you just need to add a build or release variable and click lock icon to set the variable secret.

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53