Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output container_definitions is not a list if register_task_definition is set to false #22

Open
akikoskinen opened this issue Feb 13, 2020 · 2 comments

Comments

@akikoskinen
Copy link

According to container_definitions output variable documentation:

A list of container definitions in JSON format that describe the different containers that make up your task

But if one sets the register_task_definition input variable to "false" (in order to use this module only as a container definitions JSON generator), the container_definitions output is not a list, but a JSON object, representing a single container definition. I think it's a bug to change the output variables type based on a seemingly unrelated input variable.

The place where this happens in the code is here.

@akikoskinen akikoskinen changed the title Output container_definitions is not an array if register_task_definition is set to false Output container_definitions is not a list if register_task_definition is set to false Feb 13, 2020
@jasonwalsh
Copy link
Member

Hi @akikoskinen 👋

You might want to refer to #29 for more insight. There is a reason the container definitions object is not a list if register_task_definition is set to false.

Please let me know if #29 (comment) answers your question.

@akikoskinen
Copy link
Author

I understand the use cases now. But having an input variable called register_task_definition also control the feature output_json_object_instead_of_array is very unexpected. Perhaps there should be a dedicated input variable for this latter feature? Or at the very least the documentation should state this unexpected behavior, possibly with some heavily emphasized font.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants