mapbox / ecs-watchbot

Make robots do your work for you
ISC License
196 stars 30 forks source link

Base Fargate construct #384

Closed oielbanna closed 11 months ago

oielbanna commented 11 months ago

What changed?

This PR is part of a larger restructuring of this lib to use CDK, so if there are some code comments or missing things please disregard them as this isnt being merged to main just yet. This PR introduces FargateWatchbot construct which acts very similarly to the previous template provided.

Why did I 'borrow' QueueProcessingFargateService from CDK and make some changes to it?

Good question. Im writing this for our successors when they see this and get confused why did we just copy a whole bunch of code. Some properties in CDK can only be provided when an object is getting created and can't be modified after. Namely privileged, memoryReservationMiB, & readonlyRootFilesystem. All 3 of these properties were being provided by the previous version of this library as params that can be changed and unfortunately they get locked down in CDK once you call addContainer to create a new TaskDefinition resource.

Whats next?