azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

Add secure() for secrets

Open pamelafox opened this issue 1 year ago • 15 comments

This PR makes it so that you can securely pass secrets into the container-app modules, by wrapping it in a secure() decorator. Unfortunately, we can't mark arrays as @secure, so you have to instead pass in an object of the secret key/values, and we turn that back into the expected array format.

Note that I haven't tested these exact modules since I'm working off a fork of the modules (my use case isn't compatible with the azd modules.. will file an issue about that). You can see my change here, which works: https://github.com/Azure-Samples/langfuse-on-azure/pull/9

I don't think any of the TODO templates utilize secrets for container apps, so not sure there's a test to do on the azd template side.

pamelafox avatar Mar 25 '24 20:03 pamelafox