Setup gitlab-ci pipeline for Terraform

BLOCKED BY: #2 (closed)

Terrraform code must go through a merge request (MR) in order to be applied to the infrastructure. After it has been merged to main, then the pipeline should apply the new changes.

Guide: https://docs.gitlab.com/ee/user/infrastructure/iac/

  • Use pre-configured gitlab-ci config to implement the description.
  • Validate that the pipeline config used matches the desired functionality.

Desired pipeline functionality:

  1. Run init and validate on all commits.
  2. Run apply on merge to main.
Edited by Aksel Skaar Leirvaag