HumaCLI allow custom environment variables. #954
Daniel-I-Am
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What I would like
The HumaCLI accepts options, this is defined as a struct with tags. I would like to propose adding a structtag for this allowing to read a specific environment variable by name.
Currently, Huma already allows the reading of environment variables to fill these options: (docs).
It mentions always adding the 'SERVICE_' prefix to any environment variable lookup.
I would like to propose allowing the configuration of the environment variable that is used.
Real-world use-case supporting this feature
We run a lot of services in Google Cloud Run. Google Cloud Run makes a couple assumptions about your service, these are defined in the Container Runtime Contract. One of the most important ones for this use-case is the 'PORT' environment variable.
This environment variable cannot be changed. It is part of the platform.
Currently, we rely on another environment parsing library that can handle reading from arbitrary environment variables. I would like to consolidate this under Huma to have an easier configuration and fewer moving parts.
Proposal usage
I don't mind taking a stab at contributing this feature.
Beta Was this translation helpful? Give feedback.
All reactions