github-actions-deploy-docker-to-ec2 icon indicating copy to clipboard operation
github-actions-deploy-docker-to-ec2 copied to clipboard

Enable "Ejection"

Open imaustink opened this issue 1 year ago • 4 comments

This action is focused on users who don't want to know much about the details of how their application is deployed, which is great! But this does present a potential issue down the road for some projects as they mature. Users may find themselves outgrowing the opinionated "black box" approach that this action provides.

I think a possible solution is to provide a guide or perhaps even a feature that helps transition to a more flexible and managed approach. I like to think of this as "Ejecting" the plugin, which is terminology borrowed from Create React App.

At minimum, a guide explaining how to transition to managing your own TF stacks by hand would be great. But In an ideal world, a feature could be implemented to help by opening a PR to scaffold the pieces necessary for such a transition.

imaustink avatar Mar 12 '24 22:03 imaustink

I don't think we have something written for it, but one could easily create an EC2 instance using this action, and plug-in an Aurora, RDS, ElasticCache Redis DB, an EFS volume .... (Maybe sth else that I might be missing) by using some of our other actions and tying them up together. That is a modularized approach to reach the same goal. You can then have a workflow for each, making for example, the DB and the EFS volume more static, while the EC2 instance comes and goes.

If that's what you are thinking of, it's just a matter of showing an example in a blog (maybe here or there?)

LeoDiazL avatar Mar 13 '24 20:03 LeoDiazL

I was thinking more along the lines of moving the TF stacks into source control so that it can be managed more directly by a DevOps professional.

imaustink avatar Mar 13 '24 20:03 imaustink

There is a way to get all of the generated Terraform code as an artifact in GitHub.

LeoDiazL avatar Mar 13 '24 21:03 LeoDiazL

Gotcha. I think it would be cool if we had a guide on how to do that :)

imaustink avatar Mar 13 '24 21:03 imaustink