You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the export command in CLI we can pass --env=ENV to get desired env secrets but this doesn't work when we use --template. It would be nice if we could dynamically set envSlug in templates as well as other exports.
Why would it be useful?
First of all, it reduces unnecessary duplicate template files for each environment. Second, it makes the CLI tool more consistent.
Additional context
I have 2 ideas that require minimum effort to implement this.
1- Check if envStag is empty, then replace it with --env value. Here is a edited example from agent.go file
returnfunc(projectID, envSlug, secretPathstring, args...string) ([]models.SingleEnvironmentVariable, error) {
varparsedArgumentssecretArgumentsifenvSlug== '' {
envSlug=globalEnvSlug// This can be either value set from --env or default env or env based on git branch
}
...
2- Add function to load values from env variables. This way users can implement if-else to set proper envStag. Here is an edited version from agent.go file.
Feature description
In the export command in CLI we can pass
--env=ENV
to get desired env secrets but this doesn't work when we use--template
. It would be nice if we could dynamically setenvSlug
in templates as well as other exports.Why would it be useful?
First of all, it reduces unnecessary duplicate template files for each environment. Second, it makes the CLI tool more consistent.
Additional context
I have 2 ideas that require minimum effort to implement this.
1- Check if
envStag
is empty, then replace it with--env
value. Here is a edited example from agent.go file2- Add function to load values from env variables. This way users can implement if-else to set proper
envStag
. Here is an edited version from agent.go file.I'm open to contributing to this issue if you give me the green light on this feature.
The text was updated successfully, but these errors were encountered: