[PR #1680/6f844249 backport][stable-5] ecs_service -- with force_new_deployment user can specify taskdef or not #1732
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #1680 as merged into main (6f84424).
SUMMARY
Fixes #1106
Support force_new_deployment without having to specify a task definition.
ISSUE TYPE
COMPONENT NAME
ecs_service
ADDITIONAL INFORMATION
Previously task_definition was required when state was present; regardless of whether force_new_deployment was set or not.
Previous error was along the lines of "state is present but all of the following are missing: task_definition".
New behavior enforces either task_definition or force_new_deployment is set.
If both are provided, the user's task_definition will be sent through to boto.
If only task_definition is defined, original behavior resumes.
If only force_new_deployment is set, pull the taskDefinition from existing and pass it through to boto.