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

Support for volumes in task definitions #4916

Closed
kennyg opened this issue Jan 30, 2016 · 3 comments
Closed

Support for volumes in task definitions #4916

kennyg opened this issue Jan 30, 2016 · 3 comments

Comments

@kennyg
Copy link

kennyg commented Jan 30, 2016

I would like to startup a task on each ECS instance for monitoring, following this guide: https://aws.amazon.com/blogs/compute/running-an-amazon-ecs-task-on-every-instance/
the terraform ecs_task_definition resource supports loading the container definitions. would it be possible to support loading the raw json including the volumes array via the file method?

@radeksimko
Copy link
Member

Hi @kennyg
I believe that volumes are supported since the very beginning of aws_ecs_task_definition existence.

See docs at https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html#volume

Feel free to reopen the issue if I misunderstood your question or create a new one if volume doesn't work as you expected.

@radeksimko
Copy link
Member

the terraform ecs_task_definition resource supports loading the container definitions. would it be possible to support loading the raw json including the volumes array via the file method?

This would be tricky, since volume is a separate parameter in the API & SDK, so we'd effectively have to let the user provide the whole thing (family included) via JSON. The idea behind supporting JSON was - as you mentioned - to make it easy for users to bring examples or other existing configs over to Terraform, but as it seems, it can make things more difficult.

We're currently in the middle of the same problem in K8S provider. So far it looks like we'll just end up translating JSON into HCL automatically. See the reasons & concerns we expressed there: #3453

The current limitation that already exists for ECS Task Definition is that you cannot use count & related interpolation features with containers as these are defined inside the JSON array.

Note that HCL can be transparently translated into JSON (and visa versa), so you could use something like jsonnet to construct the right JSON format for Terraform.

@ghost
Copy link

ghost commented Apr 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants