Week 11 Worklog

Week 11 Objectives:

  • Build a CI/CD process for CloudCost Insight using GitHub Actions and HCP Terraform.
  • Automatically check the Hugo Workshop, Python Lambda code, Terraform, and Dashboard JavaScript before merging.
  • Automatically deploy Terraform infrastructure changes to AWS after they are merged into the main branch.
  • Configure branch protection for main to ensure that changes must go through a Pull Request and CI checks.
  • Redeploy, test the entire system, and fix issues that arise.
  • Begin writing the Workshop step-by-step based on the actual deployment, testing, and CI/CD process.
  • Track and summarize the Workshop-writing progress of team members.
  • Maintain collaboration with the team: discuss the plan before working and summarize results after each day.

Tasks Implemented During the Week:

DayTasksStart DateCompletion DateReference Materials
2- Study at the office and build the CI process:
  + Discuss the daily work plan with the team before starting.
  + Discuss project progress, the Workshop-writing plan, and the need to automate source code checks.
  + Create the .github/workflows/ci.yml file using GitHub Actions.
  + Configure jobs to check the Hugo Workshop, Python Lambda syntax, Terraform formatting and configuration, and Dashboard JavaScript syntax.
  + Create a Pull Request to verify that the CI workflow works correctly.
  + Summarize and share the results with the team at the end of the day.
20/07/202620/07/2026- GitHub Actions Documentation:
https://docs.github.com/en/actions
- Terraform GitHub Actions:
https://developer.hashicorp.com/terraform/tutorials/automation/github-actions
3- Complete automated testing and Terraform Plan CI:
  + Discuss the daily work plan with the team before starting.
  + Build unit tests for Lambda Collector, Analyzer, and API using pytest and mock AWS clients.
  + Configure linting, syntax checking, and unit test execution for Python Lambda code.
  + Configure Terraform fmt, validate, and Terraform plan on Pull Requests through HCP Terraform.
  + Fix linting, Terraform formatting, Terraform variable, and CI workflow issues that arose during testing.
  + Summarize and share the results with the team at the end of the day.
21/07/202621/07/2026- pytest Documentation:
https://docs.pytest.org/
- Ruff Documentation:
https://docs.astral.sh/ruff/
- HCP Terraform Documentation:
https://developer.hashicorp.com/terraform/cloud-docs
4- Build CD, retest the system, and protect the main branch:
  + Discuss the daily work plan with the team before starting.
  + Create the .github/workflows/terraform-apply.yml workflow to automatically run Terraform Apply after Terraform changes are merged into main.
  + Configure the GitHub Environment production, the HCP Terraform API token, and an approval mechanism before deployment.
  + Enable branch protection for the main branch, requiring Pull Requests and mandatory CI checks before merging.
  + Redeploy and perform end-to-end testing for the entire system; check the Cognito, API Gateway, SQS, Lambda, SNS, CloudWatch, and Dashboard flows.
  + Fix issues that arose during deployment and testing.
  + Summarize and share the results with the team at the end of the day.
22/07/202622/07/2026- GitHub Environments:
https://docs.github.com/en/actions/reference/workflows-and-actions/deployments-and-environments
- GitHub Branch Protection:
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository
5- Begin writing the step-by-step Workshop:
  + Discuss the daily work plan with the team before starting.
  + Agree with the team that each member will redeploy the project independently to build an individual Workshop.
  + Build the Workshop structure and begin writing the environment preparation, infrastructure deployment, Lambda, Dashboard, Cognito, system testing, and CI/CD sections.
  + Add testing results such as SQS partial batch failure, S3 error handling, JWT authentication, and CORS.
  + Prepare illustrative images, logs, and expected results for each step.
  + Summarize and share the results with the team at the end of the day.
23/07/202623/07/2026- FCAJ Workshop Template.
6- Continue writing the Workshop and summarize progress:
  + Discuss the daily work plan with the team before starting.
  + Continue writing Workshop content and add code samples, images, logs, and testing instructions.
  + Verify that the Hugo Workshop builds successfully and that its content is updated on GitHub Pages.
  + Review the written sections to ensure that the structure and instructions are clear and consistent.
  + Summarize the Workshop-writing progress of the remaining team members and discuss the next implementation plan.
  + Summarize and share the results with the team at the end of the day.
24/07/202624/07/2026- FCAJ Workshop Template.
- Hugo Documentation:
https://gohugo.io/documentation/

Results Achieved in Week 11:

  • Completed the CI process: Built a GitHub Actions workflow in the ci.yml file to automatically check source code when there is a Pull Request to the main branch. CI builds the Hugo Workshop, checks Python Lambda code, verifies Terraform formatting and configuration, and checks Dashboard JavaScript syntax.
  • Added unit tests and Terraform Plan CI: Built unit tests for Lambda Collector, Analyzer, and API using pytest and mock AWS clients, helping to verify processing logic without calling actual AWS resources. Terraform fmt, validate, and Terraform plan were also configured through HCP Terraform to detect infrastructure issues before merging.
  • Completed Terraform CD: Created the terraform-apply.yml workflow to automatically deploy Terraform changes to AWS after changes are merged into the main branch. The workflow uses HCP Terraform to manage state and remote runs, while GitHub Environment production is used to manage tokens and control the deployment process.
  • Protected the main branch: Configured branch protection for the main branch, requiring changes to go through a Pull Request and pass mandatory CI checks before merging. This mechanism helps limit unchecked changes and reduce the risk of deploying faulty Terraform configurations to the production environment.
  • Redeployed, tested, and fixed issues: Redeployed the CloudCost Insight system using Terraform and performed end-to-end testing. The cost collection, cost analysis, SQS, DLQ, SNS, CloudWatch, Cognito, API Gateway, and Dashboard flows were tested to ensure proper operation. Issues that arose during testing were recorded and fixed.
  • Began writing the Workshop: Built the structure and began writing the Workshop step-by-step based on the actual deployment process. The implemented content includes environment preparation, infrastructure configuration, Lambda, Dashboard, Cognito, system testing, and CI/CD. The written sections were supplemented with code samples, illustrative images, logs, and expected results to help readers follow along.
  • Tracked the Workshop-writing progress of the team: Summarized the Workshop-writing progress of the remaining team members. Members discussed, reviewed, and shared deployment experiences to continue improving the documentation in the next phase.
  • Collaborated with the team: Maintained effective teamwork throughout the week. Before starting work each day, I discussed the plan with team members, and at the end of each day, I summarized the completed results so that the entire team could keep track of progress.