Open ssyberg opened 3 months ago
Hey @ssyberg! You could try using Conditions
like in this example for addons: https://github.com/aws/copilot-cli/issues/4229. You can use patches to create conditions for each environment, and then add that Condition
to the resources you want to conditionally create for each specific environment.
Hey @ssyberg! You could try using
Conditions
like in this example for addons: #4229. You can use patches to create conditions for each environment, and then add thatCondition
to the resources you want to conditionally create for each specific environment.
Ooh yes that seems like it could work, ty!
This issue is stale because it has been open 60 days with no response activity. Remove the stale label, add a comment, or this will be closed in 14 days.
I thought I understood what to do here but I think it would be helpful to 1. get an example patch that has a condition and 2. ideally get an answer on if you have have multiple patch files per service, otherwise you'd need to include them all in a single file which seems messy?
Hi, @ssyberg!
Here is an example patch that changes an existing Condition: https://github.com/aws/copilot-cli/issues/5680#issuecomment-1984790251 and here is one that adds a Condition: https://github.com/aws/copilot-cli/issues/5387#issue-1943249493
And in answer to your other question, no, you cannot have multiple patch files
Thanks @huanjani though I think I don't know CFN well enough to totally understand this. Can you tell me exactly the steps I would take here to set up one set of ALB rules for staging
and another set for production
?
Not sure if this is a feature request or just a question, but I'm trying to figure out how to implement different patches per environment or at least set parameters/variables per environment?
For example, if I have a staging and production environment how can I add this patch such that it doesn't get added to both load balancers or at least has slightly different values for each environment?