Azure DevOps CI/CD and Separating Connection Strings from Source Control

前端 未结 2 1698
无人及你
无人及你 2021-01-21 01:47

So I\'ve been following many different idea/strategies through many blogs/SO posts but I haven\'t been able to find my idea solution.

What I\'m Using

  • Vis
相关标签:
2条回答
  • 2021-01-21 02:05

    VSRM task to publish Web Apps supports overriding values in Web.config. You can keep your secrets in VSRM and replace them in the deployment time. See File transforms and variable substitution reference # XML variable substitution

    0 讨论(0)
  • 2021-01-21 02:12

    Short answer: Don't put secrets in configuration files.

    If all your resources reside in Azure, use Managed Service Identities so that you don't need to bother with connection strings.

    If not, use ARM templates and key vault-linked parameters to manage your Azure infrastructure. Azure Web Apps allow you to override configuration files with app settings/connection strings within the web app. So simply use key vault to manage that stuff, and tell the web app to pull the values from key vault.

    0 讨论(0)
提交回复
热议问题