Open tobrienultima opened 2 years ago
In addition, if I create an automation script which appends something to the variables.ps1 file then the variables section seems to 'reload' presumably because PSU has opened and updated the file, it then re-loads it. Adding or removing content from the file manually in VSCode doesn't do this though and the variables section remains out of sync.
Hi @adamdriscoll ,
I have been looking into this problem a little more and suspect part of the problem may be that all this runs after the container load but before the module load.
Would it be possible to include the latest az.keyvault and az.accounts modules with the next container release?
Steps to Reproduce
I'm running PSU in an Azure docker container webapp and I have it configured to store variables as secrets in an Azure KeyVault. Creating secrets and reading them back works fine and I can also import existing secrets via the UI and via script.
The problem seems to be when I reboot the webapp, all of the variables go into this state where PSU thinks they don't exist.
As written in the documentation, I have a script which runs after startup to re-register with KeyVault on a 30 second delay (I have also tried reducing this to 5 seconds) so I wonder if PSU is trying to load the variables before it has connected back to KeyVault, and then doesn't attempt to try again.
If I manually create a secret in the UI then it seems to force the connection to open and the existing variables go back to their normal state and can be used again.
Expected behavior
Actual behavior
Environment data
PSU v2.11.1 Azure Docker WebApp
Visuals