Urgent.News

What's breaking now, across thousands of outlets.

Tech

Cloud Resume Challenge Week 3— Infrastructure as Code with Terraform and CI/CD with GitHub Actions

Chunk 3 is complete — and this one pushed me the furthest outside my comfort zone. Infrastructure as Code, remote state management, and a fully automated CI/CD pipeline are all now in place. In this post I'm documenting exactly what I built, the decisions I made, and the bugs I hit along the way. What is Chunk 3 about? The goal is to stop clicking through the AWS Console and start defining…

Chunk 3 of the Cloud Resume Challenge focused on implementing Infrastructure as Code (IaC) using Terraform and setting up a CI/CD pipeline with GitHub Actions. The main goal was to move away from manually managing infrastructure in the AWS Console and automate the deployment process so that every push to the GitHub repository triggers a full deployment.

The tools used in this challenge were Terraform for defining AWS resources in code, GitHub Actions for automating the deployment pipeline, an S3 remote backend for storing Terraform state files, and a Dev Container for creating a reproducible development environment in GitHub Codespaces.

Terraform was chosen over AWS SAM because of its cloud-agnostic nature, industry demand, clean HCL language, and strong community support. The Dev Container setup ensured that all required tools (AWS CLI, Terraform, Python, and GitHub CLI) were automatically installed in the GitHub Codespaces environment.

The project structure consisted of a `terraform/` directory containing `main.tf`, `variables.tf`, `outputs.tf`, and `providers.tf` files. This structure allowed for defining AWS resources, input variables, output values, and provider configurations.

A critical aspect of the challenge was setting up the remote backend for Terraform state management. By storing the state file in S3, both local development and GitHub Actions CI/CD could share a consistent view of the infrastructure, avoiding resource conflict errors during pipeline runs.

Throughout the process, several bugs were encountered and resolved:

1. Resource conflicts on the first apply were fixed by importing existing resources into the Terraform state.

2. DynamoDB table item import was not supported by Terraform, so the problematic resource was removed from the main.tf file.

3. GitHub Actions initially had no access to the Terraform state file, leading to resource conflict errors. This was resolved by setting up the S3 remote backend as previously mentioned.

4. A string concatenation error in the outputs.tf file was fixed by using string interpolation instead of the + operator.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

A 5-Minute RustFS Stack with Docker Compose

A 5-Minute RustFS Stack with Docker Compose RustFS is an Apache 2.0, S3-compatible object store written in Rust that you can run as a single Docker Compose stack and reach in about five minutes.

What Is ASLR? How Does Randomizing Memory Addresses Stop Exploitation?

What if the memory address an attacker needs today isn't the same address tomorrow? That question is the core idea behind Address Space Layout Randomization.

  • ASLR randomizes memory addresses in a running program to hinder exploitation.
  • Addresses randomized include stack, heap, shared libraries, and executable.
  • ASLR makes exploitation more difficult by introducing unpredictability.

More from Sunday 27 September →