forked from ansible-collections/amazon.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ecs_service -- Capacity provider strategy (ansible-collections#1181)
ecs_service -- Capacity provider strategy SUMMARY Fixes ansible-collections#1137 Per request, allow for the user to provide a capacity_provider_strategy when creating or updating an ECS service. This capacity_provider_strategy is a list of 1-6 dictionaries. The new capacity_provider_strategy is mutually exclusive with launch_type and an existing service cannot be changed from one to the other. ISSUE TYPE Feature Pull Request COMPONENT NAME ecs_service ADDITIONAL INFORMATION The new parameter is optional and non-default. If neither launch_type or capacity_provider_strategy are provided, the new service will default to EC2 launch_type. The module handles the mutually exclusivity and also catches and fails cleanly when trying to change an existing service from launch_type to capacity_provider_strategy or vice versa. Tested pretty thoroughly against ansible 2.9.27. Updated parameters, examples, and return objects provided. Before merge the module will just ignore the capacity_provider_strategy and default to EC2 launch_type. After merge the module will handle either launch_type or capacity_provider_strategy and create/update the service as necessary. - community.aws.ecs_service: state: present name: test-service cluster: test-cluster task_definition: test-task-definition desired_count: 1 capacity_provider_strategy: - capacity_provider: test-capacity-provider-1 weight: 1 base: 0 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None>
- Loading branch information
Showing
2 changed files
with
87 additions
and
8 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
changelogs/fragments/1181-ecs_service_capacity_provider_strategy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- ecs_service - Now allows for a ``capacity_provider_strategy`` to be utilized when creating/updating a service (https://github.com/ansible-collections/community.aws/pull/1181). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters