From c81a0f76e90709febae592ecd35540aa5c3fa1f7 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Wed, 4 Mar 2020 11:48:45 -0800 Subject: [PATCH 1/2] Fix checking of executionRole in TaskDefinition --- nodejs/awsx/ecs/taskDefinition.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs/awsx/ecs/taskDefinition.ts b/nodejs/awsx/ecs/taskDefinition.ts index 0ff4d08ae..6899370b4 100644 --- a/nodejs/awsx/ecs/taskDefinition.ts +++ b/nodejs/awsx/ecs/taskDefinition.ts @@ -63,7 +63,7 @@ export abstract class TaskDefinition extends pulumi.ComponentResource { args.taskRole ? args.taskRole : TaskDefinition.createTaskRole( `${name}-task`, /*assumeRolePolicy*/ undefined, /*policyArns*/ undefined, { parent: this }); - this.executionRole = args.taskRole === null ? undefined : + this.executionRole = args.executionRole === null ? undefined : args.executionRole ? args.executionRole : TaskDefinition.createExecutionRole( `${name}-execution`, /*assumeRolePolicy*/ undefined, /*policyArns*/ undefined, { parent: this }); From 09aa3050c9a4b37d263ad333e5d4fbc0f1ce9886 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Wed, 4 Mar 2020 11:52:34 -0800 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 008fcb15d..e937f9e4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ CHANGELOG * Update `Service`, `EC2Service` and `FargateService` interface to support the full set of supported ECS Service properties * Ensure `CustomResourceOptions` are passed to underlying `ecs.Service` when using `awsx.ecs.FargateService` and `awsx.ecs.EC2Service` * Update `TaskDefinitionArgs`, `EC2TaskDefinitionArgs`, `FargateTaskDefinitionArgs` to allow for null taskRole, executionRole, and logGroup attributes. +* Fix bug in `TaskDefinition` when `executionRole` is ignored when `taskRole` is `null`. + [#517](https://github.com/pulumi/pulumi-awsx/pull/517) ## 0.19.2 (2020-01-31)