One thing I noticed in my script is that the longest process was fetching secrets.
@adam, do you have any idea why retrieving a secret via the $secret scope could take that long? this is latest version of 4 using the default litedb setup.
Ahhh ok. I was going to say there’s no way it should be that slow in the database but that would be more sense. That said, 1.9 seconds is super slow! Could it be network or is it just on the Azure end?
Then use $Secret:MyLocalSecret locally. I do think it changes the security model a bit by copying them locally, but I think that’s up to you to determine if that’s right for your org.
The only downside to this is that it duplicates the vars.
I guess we could have something in the initialize.ps1 that creates these vars and another process that handles the sync.
Can you elaborate on what you mean by security implications?
I think the route I want to take once we migrate to SQL in our production environment is to have the secrets stored locally rather than reach out to Azure for them.
Mostly just suggesting that they are stored locally rather than in the cloud which could be against company policy. If it’s not then, no reason to worry about it. Especially if you plan to just store them locally in the DB.