Skip to content
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

docs(stepfunctions-tasks): clarify that ITaskDefinition cannot be used in RunEcsEc2Task #3425

Merged
merged 1 commit into from
Jul 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export interface CommonEcsRunTaskProps {
readonly cluster: ecs.ICluster;

/**
* Task Definition used for running tasks in the service
* Task Definition used for running tasks in the service.
*
* Note: this must be TaskDefinition, and not ITaskDefinition,
* as it requires properties that are not known for imported task definitions
*/
readonly taskDefinition: ecs.TaskDefinition;

Expand Down Expand Up @@ -154,8 +157,8 @@ export class EcsRunTaskBase implements ec2.IConnectable, sfn.IStepFunctionsTask
// Need to be able to pass both Task and Execution role, apparently
const ret = new Array<iam.IRole>();
ret.push(this.props.taskDefinition.taskRole);
if ((this.props.taskDefinition as any).executionRole) {
ret.push((this.props.taskDefinition as any).executionRole);
if (this.props.taskDefinition.executionRole) {
ret.push(this.props.taskDefinition.executionRole);
}
return ret;
}
Expand Down