awslabs / fargatecli

CLI for AWS Fargate
Apache License 2.0
893 stars 114 forks source link

Can't add environment variable that contains a comma #40

Closed jrtilson closed 4 years ago

jrtilson commented 6 years ago

If we enter:

fargate service env set myapp --env MY_VAR=has,comma

The result is:

[!] Invalid environment variable comma must be in the form of KEY=value

This is an issue because I'm trying to supply a mongodb string, ie:

MONGO_URL=mongodb://user:pass@host1,host2/db?auth=123&key=456

Can the value portion be escaped somehow?

abarfoot commented 6 years ago

Possible workaround: When the value is a url, try substituting %2c for the comma.

holyjak commented 5 years ago

It seems pretty easy to fix according to https://github.com/turnerlabs/fargate/commit/f2fe902664045c135f37eca877e717f4b3c345e4, replacing Flags().StringSliceVarP with Flags().StringArrayVarP. Could it be done? Please? 🙏

PaulMaddox commented 4 years ago

Merged :)