ECS-Task Infrastructure Block Overrides

Is there a way to override some of the settings on an ECS-Task infrastructure block in a flow file or deployment? In 1.0 we could define items like cpu, memory, image, etc inside the flow file (ECS Run) as part of the run config. Is there a similar way it could be done in 2.0? If not in the flow file then as flags in the cli command for the deployment? Or will we have to just make different blocks with different cpu/memory/image combinations and achieve this by selecting the appropriate infrastructure block at deployment rather than have a single one-size-fits-all infrastructure block with overrides.

I saw this post (Can I override CPU and memory value of the ECSTask infrastructure block for a specific container?) but based on the ‘Where can I run that from?’ this doesn’t work as you can override the infrastructure when its already running.

I figured this out. The infra_overrides argument in deployment applies to all arguments for that infrastructure block type. So for us the easiest implementation is just to write a python script for our deployment that we keep in the same repo as the flow and then have our CI/CD pipeline run the deployment script on pushes to the commit. We can use one infrastructure block for our ECS cluster and then tweak things like cpu, image, memory etc on a flow by flow basis by making overrides in the deployment file of each flow.