troposphere icon indicating copy to clipboard operation
troposphere copied to clipboard

ECS Entrypoint as a CommaDelimitedList

Open shyamvala opened this issue 8 years ago • 2 comments

With AWS CloudFormation I know that we can supply a CommaDelimitedList parameter for the EntryPoint property when setting up the ContainerDefinition. When I try to do the same thing using this library I get the error Attribute EntryPoint must be a list.

Looking at the source I see that it is expecting a list of strings. So clearly it is doing what it is supposed to do.

Just making sure I am not missing anything here. I can easily convert my parameter to a list of strings.

shyamvala avatar Aug 22 '17 21:08 shyamvala

@shyamvala Can you provide an example of how you are using EntryPoint in your templates?

gkrizek avatar Oct 01 '17 14:10 gkrizek

@gkrizek When I'm trying to pass couple values using troposphere entrypoint, for instance ENTRYPOINT ["/bin/bash", "entrypoint.sh"] it fails with the next error.

TypeError: <class 'troposphere.ecs.ContainerDefinition'>: None.EntryPoint is <class 'list'>, expected [<class 'str'>]

AWS entryPoint is string array type, example: "entryPoint": ["string1", "string2",...]

image

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html Which mean that it should be dict, rather than string - https://github.com/cloudtools/troposphere/blob/master/troposphere/ecs.py#L354 This would make possible passing few values to troposphere entrypoint.

romanbovda avatar Jul 23 '20 10:07 romanbovda