Veleous
5 months ago

Parameterized envinronment variables

Posted 5 months ago by Veleous

I have an enviromnent variable which is a URI and contains some query parameters that can change based on the enviroment and other factors.

Would it be recommended to keep everything in one environment variable, or have the changable values as separate environtment variables which can then be used to compose the final URI?

Option 1

URI="https://dev.domain.com?key1=fuhsf7w78gww08hb&key2=eofubw97b847fs8f0..."

Option 2

URI="https://%s.domain.com?key1=%s&key2=%s..."
KEY_1="fuhsf7w78gww08hb"
KEY_2="eofubw97b847fs8f0"

Then combine the above somewhere.

Please sign in or create an account to participate in this conversation.