cloudposse / terraform-aws-ecs-container-definition

Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource
https://cloudposse.com/accelerate
Apache License 2.0
339 stars 244 forks source link

linux_parameters variable value should allow filling only the needed options #160

Open walid-farhani opened 1 year ago

walid-farhani commented 1 year ago

Describe the Bug

When declaring the linux_parameters input variable, I cannot populate values for only the specific parameters that I need. In the official documentation, none of the Linux-specific options are marked as required. However, in the module implementation, it is mandatory to populate all the Linux-specific options in order to set even one parameter.

Expected Behavior

When declaring the linux_parameters input variable with only the specific parameters that I want to set, the module should accept the input and set the provided parameters without requiring all the Linux-specific options to be populated.

Steps to Reproduce

  1. Declare the linux_parameters input variable with a partial set of parameters in the capabilities object.
  2. Apply the Terraform module that uses the linux_parameters input variable.
  3. Observe that the module fails with an error message that indicates that all the Linux-specific options must be populated, even though only a partial set of parameters were provided.
  4. Attempt to declare the linux_parameters input variable with only the specific parameters that you want to set again.
  5. Observe that it is not possible to set only specific parameters, and that all Linux-specific options must be populated in order to set any parameters.

Screenshots

image

Environment

No response

Additional Context

No response

hpaolini commented 1 year ago

There's a temporary solution here: https://github.com/cloudposse/terraform-aws-ecs-container-definition/issues/143#issuecomment-896049039