jaylong255 / cyberworld-site

0 stars 0 forks source link

7 express infrastructure resources as terraform #25

Closed jaylong255 closed 1 year ago

jaylong255 commented 1 year ago

Ticket(s)

  1. https://github.com/jaylong255/cyberworld-site/issues/7

Related PR(s)

  1. #0

Changes

  1. Adds a Terraform module that expresses the unique AWS resources used to serve a static frontend from an s3 bucket behind a CloudFront CDN
  2. Launches a staging environment for the CyberWorld static frontend
  3. Adds a CI/CD pipeline that uses a GitHub Action that interfaces with Terraform Cloud to manage environments in AWS through pull requests related to code stored in the terraform subfolder.

Checklist

jaylong255 commented 1 year ago

@diego3158 this pr is super-badass. Typically, a repo for a static frontend like this just has the application code. Often if a frontend developer wants to show off their ability to work beyond frontend, they will set up a deployment pipeline. Since I have a background as a Cloud Architect, I'm pretty familiar with Infrastructure as Code (IaC). Specifically Terraform. What I've done here is package in the Terraform code that manages actual infrastructure resources in AWS. So not only can you review and track the code that powers the app. You can actually review and track the code that expresses the infrastructure resources that the app is deployed to.

I'll add some comments on the Terraform code, too to explain what all we're launching. It's actually not that complicated. It's only 5 resources total, and some of those are security policies that allow and limit access. There's only 2 you should care about at first: the bucket and the CDN.