Fantastic idea, and nice write up. I'd suggest updating your implementation to use the InlineProgramArgs, for even more flexibity. When your infrastructure can be imported as a module, its very powerful. Also, TypeScript! 🙂
11/26/2020, 6:39 AM
@hundreds-musician-51496 Thank you for the comment! I will take that into consideration, I felt like I am missing quite a lot of flexibility when it comes to writing my infrastructure, I will be tackling this issue soon.
11/27/2020, 6:37 PM
I implemented a system like this at work, and the most beneficial part was being able to make infrastructure changes part of each deploy. That is, for a given PR, I could try out new infrastructure as well as application level code changes.
12/03/2020, 6:51 PM
interesting approach regarding the destroying of stack on PR close
we have a similar situation, although we are destroying the stack immediately.. so on each event, we deploy, run Cypress against the deployed system, and then destroy
I made this action that can help you run things when the workflow is about to be done: https://github.com/webiny/action-post-run
So basically, with it, we destroy the stack, no matter if the tests have passed or failed. Without it, when the tests fail, the stack wouldn’t be destroyed. The upper action resolves this issue.
Just wanted to link that here, maybe it helps 🙂
12/04/2020, 8:03 AM
Cool! That's actually the way I want to end up at the end. Running some tests against the deployed instances, get the results back and destroy it. I think that way it's much better, more automation. Something that maybe is pretty cool to have is to save these results somewhere, and compare them later against the newest PR and see the difference that has been made with the code changes when it comes to performance, size etc. etc.