Hey,
I’m building a Harness workflow for an Amazon ECS app with a service behind a load balancer, but a bit of the config seems to be in the wrong place, so I’m unsure if I’m using Harness correctly.
My dummy “Widget” app has two environments and the “Frontend” service is the one behind the LB.
In the environments for both I’ve happily defined the two different service infrastructures - pointing to different AWS resources, which covers the different VPCs, security groups and so on:
The confusing bit is when I come to the workflow, which is a blue/green replacement that I’ve parameterised by environment so it can be used in either:
If I click into the Setup Load Balancer step, it seems this is the point to link the step to a particular load balancer plus prod and stage listeners. Obviously, this varies between the two environments - should this configuration be in the service infrastructure section instead?
I’ve come up with a workaround by adding service variables (alb_name
, prod_listener_arn
, stage_listener_arn
), overriding them in both environments and then using these in the Setup Load Balancer step instead. Unfortunately it’s a bit hacky as I have to drop into the configuration as code section and needs a bit of work to set up:
Is there any better way of setting up this Setup Load Balancer step across the environments with one workflow? Should it be set up in the service infrastructure?
Cheers,
Dominic