Skip to content

Commit

Permalink
docs(stepfunctions-tasks): description for ecs run task with imported (
Browse files Browse the repository at this point in the history
…#24098)

## Summary

This PR...

- Improves the documentation for `aws-stepfunctions-tasks.EcsRunTask`

## Motivation

- As mentioned in #24097 , an imported taskdefinition cannot use the Construct of EcsRuntask.
- However, the current documentation does not specify an alternative, which may lead to a wrong understanding that L1 Construct may have to be used.
- In fact, we would like to clarify that it is generally possible by using CustomState(L2 Construct)

Closes #24097 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
bun913 committed Feb 10, 2023
1 parent aa8a635 commit 5452b73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export interface CommonEcsRunTaskProps {
*
* Note: this must be TaskDefinition, and not ITaskDefinition,
* as it requires properties that are not known for imported task definitions
* If you want to run a RunTask with an imported task definition,
* consider using CustomState
*/
readonly taskDefinition: ecs.TaskDefinition;

Expand Down
2 changes: 2 additions & 0 deletions packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export interface EcsRunTaskProps extends sfn.TaskStateBaseProps {
*
* Note: this must be TaskDefinition, and not ITaskDefinition,
* as it requires properties that are not known for imported task definitions
* If you want to run a RunTask with an imported task definition,
* consider using CustomState
*/
readonly taskDefinition: ecs.TaskDefinition;

Expand Down

0 comments on commit 5452b73

Please sign in to comment.