-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(stepfunctions-tasks): EcsRunTask does not have PropagateTags parameter #14553
Comments
Workaround: class ModifiedEcsRunTask extends sfntasks.EcsRunTask {
constructor(scope: Construct, id: string, props: sfntasks.EcsRunTaskProps) {
super(scope, id, props);
}
protected _renderTask(): any {
const orig = super._renderTask()
const ret = {};
Object.assign(ret, orig, { Parameters: { PropagateTags: 'TASK_DEFINITION', ...orig.Parameters } });
return ret;
}
} |
I am unassigning myself and marking this issue as We use +1s to help prioritize our work, and are happy to reevaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization. Please feel free to work on this issue yourself and request my review if you submit a PR or would like design help! See CONTRIBUTING.md for guidelines. |
Thanks for looking at this and also suggesting a workaround. I'm not familiar with TypeScript and jsii. Can I try a similar workaround with the Python source code directly or do I need to make the changes as above and somehow automatically generate the Python? Another workaround that I have used elsewhere is to use the L2 construct to generate state JSON, add the required parameters and then create a custom state from the JSON. Unfortunately, in this case, I need to add things such as retries to the EcsRunTask object which aren't available to a custom state object. |
Not a Python expert, but here's the equivalent class ModifiedEcsRunTask(sfntasks.EcsRunTask):
def to_state_json(self):
orig = super().to_state_json()
ret = copy(orig)
ret['Parameters']['PropagateTags'] = 'TASK_DEFINITION'
return ret |
Awesome, thank you. I will give that a try. |
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
The stepfunction service integration with ecs has the option of propagating tags to a task based on those applied to the task definition - docs. This option doesn't appear to be available when using EcsRunTask.
Use Case
Tagging individual tasks will allow better allocation of costs to internal projects.
Proposed Solution
Add the PropagateTags parameter as an option to EcsRunTask.
Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: