This demo shows how to use Azure Keyvault secrets to set application configuration settings
- Build the docker image locally to run
- Push the docker image out to a docker hub
- Update main.tf file kv-name var with a unique keyvault name
- Update main.tf file with the docker image name
- Update main.tf file with the web app name (needs to be unique)
- Run az login at the terminal to authenticate to Azure
- terraform init in the ./terraform directory
- terraform apply in the ./terraform directory
- Go and add a secret to the keyvault that was created (through Azure portal)
- Update the application configuration key name in the app service to CONFIG_VALUE_SAMPLE
- Update the application configuration value in the app service to the name of your secret
- Call the endpoint {your website}/config_value to see the value
- Change the secret value
- run commands below to add fake app settings
- Call the endpoint {your website}/config_value to see the new value
echo "current settings---" az webapp config appsettings list --name ase-app-config-test --resource-group rg-web-app echo "create temp setting---" az webapp config appsettings set --name ase-app-config-test --resource-group rg-web-app --settings my_temp_setting=ThisMakesTotalSense echo "delete temp setting---" az webapp config appsettings delete --name ase-app-config-test --resource-group rg-web-app --setting-names my_temp_setting