Managing variables and configuration across environments (Windows)
Duration: 4 hours | Module: Release Management
dev-configDevelopment environment configurationClick "+ Add" and add these variables:
| Name | Value |
|---|---|
| dbServer | dev-sql.database.windows.net |
| dbName | CalculatorDB_Dev |
| apiUrl | https://dev-api.example.com |
| logLevel | DEBUG |
| environment | Development |
Name: staging-config
| Name | Value |
|---|---|
| dbServer | staging-sql.database.windows.net |
| dbName | CalculatorDB_Staging |
| apiUrl | https://staging-api.example.com |
| logLevel | INFO |
| environment | Staging |
Name: prod-config
| Name | Value |
|---|---|
| dbServer | prod-sql.database.windows.net |
| dbName | CalculatorDB_Production |
| apiUrl | https://api.example.com |
| logLevel | ERROR |
| environment | Production |
Update your DeployDev stage:
Save and close
dev-sql.database.windows.netstaging-sql.database.windows.netprod-sql.database.windows.netprod-config variable groupdbPasswordMySecureP@ssw0rd123Update Production deployment:
In pipeline logs, you'll see:
Add base configuration:
Save and close
Add ASPNETCORE_ENVIRONMENT variable:
Add template with tokens:
Save and close
| Name | Value |
|---|---|
| DB_USER | prod_admin |
| DB_PASSWORD | (secret value) 🔒 |
Add to deployment steps:
You've mastered environment configuration!
Ready for Day 17: Deployment Strategies