Azure webapp for containers doesnt update the Keyvault secret values on app restart.
We are running our backend in Azure webapp for containers and have a KeyVault secret references as one of the environment variable. As per the Azure documentation, these values are refreshed from keyvault every 24 hours.
Our issues is that this value should be updated in the container env var as soon as the value changes in the key vault. We tried the "Pull References Values" feature from the configuration tab which eventually updates and restarts after approximately 4 to 10 mins. After the restart it was updating the new value from the key vault. Now this feature seem to be flaky.
We restarted the webapp multiple times but that did not update the environment variables from the keyvault.
We have an automated deployment pipeline which deploys a new container image to the webapp and used az rest
cli command to hit the appsettings/refresh
endpoint then restarted the webapp which worked for a while now it doesn't