containers-roadmap
containers-roadmap copied to clipboard
ECS console should not allow variable names with spaces, especially at the end
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about your request In the task definition for ECS, the console allows the creation of variable names with spaces in them. Although the AWS documentation is not clear about this, variable names generally do not allow spaces, as in the shell.
For example entering 'a b c' in th console generates:
"environment": [
{
"name": "a b c",
"value": "foo"
Even worse, if a user uses copy-and-paste to enter a name, there will usually (in Windows) be an extra space at the end. This generates a variable name with a space at the end that is very hard to detect in the console without looking at the generated JSON.
"environment": [
{
"name": "Variable ",
"value": "value "
}
],
Which service(s) is this request for? I have tested this in ECS. There could be similar issues with EKS.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? If an extra space is serendipitously added to the end of a variable in the console, it is stored as part of the variable name in the task definition, which is certainly not what the user intended. e.g. "Variable " instead of "Variable".
This kind of mistake is also very hard for a user to diagnose because looking at the console does not reveal whether an extra space is present.
This could easily be fixed by AWS by either always filtering out extra spaces, since they are generally not allowed in variable names, or just reporting an error in the console for invalid values.
Actually, now that I am testing I see the console also allows all kinds of illegal characters in the name:
{
"name": " !@#$%^&*()=;zz ",
"value": "very bad"
}