-
-
Notifications
You must be signed in to change notification settings - Fork 555
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
ECS Fargate volumesFrom container definition not working #187
Comments
we will need a reproduction in order to help troubleshoot or fix |
Sure.. You'll have to supply your own subnet....
|
don't you need more details than what you are providing in your config per the API spec https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_VolumeFrom.html ? |
If I go in manually to the task and add the volume like this…
[image](https://github.com/terraform-aws-modules/terraform-aws-ecs/assets/6855954/1125d926-f52a-4a3e-89a5-e57a86025b3c)
The JSON now shows the proper code…
[image](https://github.com/terraform-aws-modules/terraform-aws-ecs/assets/6855954/e7d6ba1b-924c-4f3c-b43e-ba46a2e7791e)
Anything I send in “volumesFrom” in the task definition is not sent.
Chris
|
why are you specifiying this volumesFrom = ["nginx-1"] When your screen show shows it should look like this volumesFrom = [{
sourceContainer = "nginx-1"
readOnly = false
}] |
I tried both and neither worked, i was just guessing at this point. |
I added the code exactly like you stated above and this was the terraform apply output and volumesFrom = []
|
this is the correct syntax for your example: volumes_from = [{
sourceContainer = "nginx-1"
readOnly = false
}] |
I swear I read the documentation here. I've spent two days on this. Your my hero today. Im sorry to have wasted your time. Thanks, Chris |
you're not wasting anyones time 😅 - which is why I added it to the examples. Its not great, but its something. This is an unfortunate side effect of not having the container definition fully in Terraform hashicorp/terraform-provider-aws#17988 The container definition is just a json blob sent to ECS, and thats why you see the camel casing. But Terraform uses the snake case form, and without the container definition fully defined in Terraform natively, we have that weird edge case where the two casings meet and its a confusing pain point for a lot of folks unfortunately |
Keep up the excellent work! :) I'll remember the snake case form from now on. |
This issue has been resolved in version 5.11.1 🎉 |
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. |
Description
I have an ECS Fargate container definition that specifies volumesFrom. This value is not passed to AWS.
Snippet of terraform code:
Terraform apply:
AWS json
Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version 5.11.0:
Terraform version:
Terraform v1.7.5
on linux_amd64
Provider version(s):
Terraform v1.7.5
on linux_amd64
Reproduction Code [Required]
See snippet above
Expected behavior
I expect the volumesFrom to appear on the task definition in AWS
Actual behavior
The volumesFrom value doesnt get set in the container definition on aws.
Terminal Output Screenshot(s)
Additional context
The text was updated successfully, but these errors were encountered: