fastly / Viceroy

Viceroy provides local testing for developers working with Compute.
https://fastly.dev/learning/compute/testing/#running-a-local-testing-server
Apache License 2.0
140 stars 35 forks source link

Populate secret and/or config stores from environment variables #359

Open joeshaw opened 2 months ago

joeshaw commented 2 months ago

You can populate config or secret stores either inline in the fastly.toml file or by reading a file from disk. It would be nice if you could also populate them with environment variables from the host environment.

My current use case for this is passing in an API credential when running Viceroy in a test runner mode. I don't want to check this credential into git, and I would rather not have to bother with an external, local-only file.

cee-dub commented 2 months ago

This is sort of the opposite direction of what I'd like to do, which is to populate environment variables within the process space from (probably) a config store.

joeshaw commented 2 months ago

Yes, but I don't view the two as mutually exclusive. And depending on how we namespace things, it's maybe possible that an environment variable FOO_BAR=baz in the host environment is also FOO_BAR=baz in the guest environment.

cee-dub commented 2 months ago

Unintentional if it sounded like I was saying these were in conflict or this wouldn't also be very useful. It's a good fit for a tool like Viceroy.