Infrastructure-as-Code challenge


In college, I had a subject called “Cloud Engineering”. This subject made me more familiar with AWS and DevOps.

My teacher gave me, together with three other students, the assignment to create a Gitlab CI/CD pipeline which uses Infrastructure as Code to deploy a web-application to AWS. The pipeline is executed after every merge to the main branch in Gitlab.

The pipeline consists of 4 parts:

  • Terraform validation (validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc.)
  • Terraform plan (prepares our configuration settings and see of the settings are correct)
  • Terraform apply (executes the Terraform plan, to see if the configuration is set correctly)
  • Terraform destroy (destroy everything we’ve done before. Start from scratch)
    • In our terraform, we use an S3 bucket to store our tfstate file to do a terraform destroy in the pipeline. All the notifications are send to our Discord channel to see if the job has failed or passed.

As for this project, I did almost everything except for the documentation because the other students where quite incompetent.

Used technologies:

  • Gitlab CI/CD Pipelines
  • Bash scripting
  • Terraform
  • Bookstack
  • AWS
  • EC2 Instances

Applied skills:

  • Working in a team
  • Splitting up large projects into small, manageable parts.
  • Agile & Scrum