From 690b5edfe94c153e8f22f471e0f7bee9e3439f35 Mon Sep 17 00:00:00 2001 From: okirmis Date: Tue, 14 Nov 2023 15:01:29 +0100 Subject: [PATCH] Do not use runtimePlatform for non-fargate ECS Task Definitions runtimePlatform options should be empty for task definitions with EC2 launch_type, because otherwise services will not be able to deploy them --- plugins/modules/ecs_taskdefinition.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/modules/ecs_taskdefinition.py b/plugins/modules/ecs_taskdefinition.py index 4c4aefc2032..36e07112c9e 100644 --- a/plugins/modules/ecs_taskdefinition.py +++ b/plugins/modules/ecs_taskdefinition.py @@ -897,6 +897,8 @@ def register_task( params["placementConstraints"] = placement_constraints if runtime_platform: params["runtimePlatform"] = runtime_platform + if launch_type != "FARGATE": + params["runtimePlatform"] = {} try: response = self.ecs.register_task_definition(aws_retry=True, **params)