-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Bug]: aws_ecs_service fails with "Family should not be null or empty." #27362
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I hope this should be easy fix. All we need is to make sure when Terraform creates ECS with external deployment controller to ignore taskDefinition. Not even providing it as an empty string. |
Update: Just confirmed the issue is also present on latest Terraform v1.3.3 using latest aws provider (4.35).
Please note - this issue blocks anyone to create ECS service that uses EXTERNAL deploy controller. I think it should be prioritized accordingly. |
I am also seeing this bug for my EXTERNAL deployment controller services |
I cannot even pass a valid task definition name as a parameter to workaround this issue |
here is a fix if you want to upvote: #27390 tested myself and works |
Thanks everyone! |
This functionality has been released in v4.37.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
0.12.31
AWS Provider Version
4.35
Affected Resource(s)
AWS ECS - CreateService fails when you try to create ECS service that uses EXTERNAL deployment controller
deployment_controller {
type = "EXTERNAL"
}
Expected Behavior
ECS Service should be created.
Actual Behavior
Error: error creating ECS service (service-name): InvalidParameterException: Family should not be null or empty.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
As you probably know, when using EXTERNAL deployment controller on ECS you should not provide task definition to the ECS during the creation of service. From AWS Cloud Trail logs I could confirm that latest Terraform provider still sends taskDefiniton as empty string. Looks like this was workinig fine until few days ago.
It seems that AWS updated ECS api recently and now requires that taskDefinition element is strictly not present in JSON request. I could confirm this by creating the same ECS service using AWS Cli and providing JSON without taskDefinition element.
aws ecs create-service --cluster cluster-name--service-name svc-name --region us-east-1 --cli-input-json file://ecsaws.json
If taskDefinition field is present in JSON file it fails with the same error:
"An error occurred (InvalidParameterException) when calling the CreateService operation: Family should not be null or empty."
Debug Output
Just attaching Cloud Trail log that confirms Terraform providers is sending taskDefinition in API request as empty string "".
"taskDefinition": ""
Full event
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No response
The text was updated successfully, but these errors were encountered: