Menu

Azure DevOps Crash Course (Part 6): Secrets and Settings with Variable Groups and Key Vault
📰

Azure DevOps Crash Course (Part 6): Secrets and Settings with Variable Groups and Key Vault

DEV Community: dotnet·Rehana Parveen·11 days ago
#tPif4t3b
#devtodotnet#devto#dev#todoapi#secrets
Long article (1227 words) — no AI summary yet.
Reading 0:00
15s threshold

A few years ago I reviewed a pull request that had a production database password sitting right there in appsettings.json . The developer was not careless, they were just in a hurry. The password had been in the Git history for two weeks before anyone noticed. We had to rotate it, and of course it was used in four other places.

Since then I have one simple rule: if it is a secret, it never goes in Git, and it never goes in YAML.

In Part 5 we deployed the Todo API to Dev and Prod. Today we give it real configuration: normal settings that change per environment, and real secrets that stay secret. We will use two tools for that: Variable Groups and Azure Key Vault .

Where each setting should live

appsettings.json (in Git): safe defaults only. Things like log levels or a friendly app name.

Variable groups (in Azure DevOps): values that are different per environment, like a feature flag or a URL.

Azure Key Vault : real secrets.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.