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
340 stars 245 forks source link

Resolve issue with mount_points.readOnly bool and TF15 #137

Closed darpham closed 3 years ago

darpham commented 3 years ago

what

why

references

comments/notes

nitrocode commented 3 years ago

See the original PR https://github.com/cloudposse/terraform-aws-ecs-container-definition/pull/78/files that changed

Unfortunately this will break backwards compatibility with previous default of readOnly to false which is why the list(object()) definition for this variable was removed since in pre-0.15 versions, we could not set optional map values.

It would be better to analyze why terraform 15 has an issue with unmarshalling string readOnly of type bool. Perhaps it's a bug in terraform?

Even better would be that once we move to all of our modules to tf 15, we use the optional function instead and remove our dependence on previous versions.

nitrocode commented 3 years ago

/test all

nitrocode commented 3 years ago

@darpham it seems it's better to explicitly set the variable if there is no other workaround. Thank you for the PR.