2. Cloud Resume Challenge: GitHub and GitHub Actions

I am a Sr. Windows Administrator looking to sharpen my skills within the cloud space. This blog serves not only as a guide for others to use but also to document my cloud journey.
Search for a command to run...

I am a Sr. Windows Administrator looking to sharpen my skills within the cloud space. This blog serves not only as a guide for others to use but also to document my cloud journey.
No comments yet. Be the first to comment.
In this series, I will outline the steps to integrate a fully functional serverless website hosted on CloudFront using Amazon S3. The implementation deployment will be through Terraform.
In this module, you will create an S3 bucket that will store your web files. Later you will convert this bucket into a static-hosted website. Let's get started! Terraform S3 Reference Create a new branch in GitHub Login to GitHub Select the Issu...
Deploying my portfolio site with Terraform was an enriching experience. It allowed me to craft the architecture precisely as I envisioned it. Each resource deployment deepened my understanding of the services I employed, many of which were new to me....

In this final module, you will create an ACM certificate and Route53 entries for CloudFront and API Gateway using your custom domain name. This will present a more profession website that can be shared with others. Terraform ACM Reference Terraform...

In this module, you will be updating your HTML and JavaScript files to integrate your API Gateway resources. You will also make modifications to your terraform-apply_cloudfront-invalidation.yml to invalidate your CloudFront Distribution. The invalida...

In this module, you will be creating your API Gateway and a couple of resources that will interact with your Lambda Functions from the previous module. You will create API resources that will utilize POST HTTP Methods. Once your API Gateway is deploy...

In this module, I will walk you through each of the Lambda functions and how they work, upload those functions to AWS, and test their functionality with their respective resources. Terraform Lambda Reference Boto3 DynamoDB Reference Boto3 SNS Refer...

To get started within this module, you will be creating a GitHub repo from the template repo. Then you will prepare your Terraform Cloud environment with some configurations in preparation for creating your AWS infrastructure.
Let's get started!
Login to GitHub
Go to my template > Select Use this template > Select Create a new repository

Input a Repo name and Description
Select Create repository


git clone https://github.com/YOUR_REPOSITORY.git PATH_TO_SAVE_LOCATION


In GitHub, select Issues > New Issue
Enter a title for your issue, e.g. Modify GitHub Actions
Enter a description if you'd like
Select Submit new issue



Open your IDE Terminal.
Input the following:
git fetch origin
git checkout YOUR_BRANCH_NAME

Login to Terraform
Select Projects & workspaces > Select New > Project

Input your Project Name
Select New > Workspace

Select API-Driven Workflow
Input your Workspace Name
Select the Project you created from the drop-down

You will be taken to the Overview page for this workspace. You will see some Example code on this page with your organization and workspace name.

Take note of these.

./infra


Create the following variables:
AWS_ACCESS_KEY_ID - Select the Sensitive dialog box
AWS_SECRET_ACCESS_KEY - Select the Sensitive dialog box



Under Account Settings, Select Tokens
Select Create an API Token


Take note of the output from the token. You will need this for your GitHub Secrets
Go back to GitHub
Select your repo for this project
Select Settings on the top right


Select New repository secret
Create the following Secrets:
AWS_ACCESS_KEY_ID - same information as the Terraform Cloud Variable.
AWS_SECRET_ACCESS_KEY - same information as the Terraform Cloud Variable.
TF_API_TOKEN - output from Terraform Cloud API Token.

NOTE: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY will be utilized later for CloudFront invalidations.
Open your IDE
Update your terraform-plan.yml and terraform-apply_cloudfront-invalidation.yml files to reflect your Organization and Workspace.


Ensure your files are saved.
In your IDE Terminal, type the following:
git add .
Add all files that were changed.
git commit -m "updated .yml files with terraform organization and workspace."
Commit the changes with a comment.
git push
Push to GitHub.
Go to GitHub
You should see the push on your repository

Select Compare & pull request
Validate the changes that were made to be pushed to main
Select Create pull request
Select Merge pull request

Confirm merge
Delete Branch
In your IDE Terminal, input the following:
git checkout main
This will checkout main and swap out of your branch
git pull
This will pull the configuration from GitHub so that main is in sync
In the next module, you modify some of your terraform files to create an Amazon S3 Bucket. You'll also make modifications again to your GitHub workflow so that your resources will be created automatically.