-
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
feat(event-targets): add support for fargate/awsvpc tasks #2707
Conversation
The target is "enhanced" using an AwsCustomResource calling `CloudWatchEvents.putTargets`. Fix wrong reference to container name in `containerOverrides` (must be `name`). BREAKING CHANGE: `targets.EcsEc2Task` renamed to `targets.EcsTask`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/@aws-cdk/aws-events-targets/lib/ecs-task-properties.ts
Outdated
Show resolved
Hide resolved
const assignPublicIp = subnetSelection.subnetType === ec2.SubnetType.Private ? 'DISABLED' : 'ENABLED'; | ||
|
||
new cloudformation.AwsCustomResource(this.taskDefinition, 'PutTargets', { | ||
onUpdate: { // We don't need an onDelete here because the target will be owned by CF anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing to me. Why no onCreate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onCreate
defaults to onUpdate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to say I have mixed feelings about this implementation... but I guess this is the point of the CDK :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which implementation, AwsCustomResource
or this ECS target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the fact that it is using a custom resource to achieve its goal.
The target is "enhanced" using an AwsCustomResource calling
CloudWatchEvents.putTargets
.Fix wrong reference to container name in
containerOverrides
(must bename
).BREAKING CHANGE:
targets.EcsEc2Task
renamed totargets.EcsTask
Pull Request Checklist
design
folderBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.