legion icon indicating copy to clipboard operation
legion copied to clipboard

Automate Terraform execution with GitHub Actions

Open tltran-legion opened this issue 2 years ago • 0 comments

Summary

Automating Terraform with CI/CD

Current State

We use to have Atlantis for the CI/CD of infrastructure, however, maintaining an ec2 instance for Atlantis might not be the ideal solution for our usage.

Github Workflow actions allows for a simple alternative for the time being. We need to make sure it allows for all the setup we would like to have, and setup it up for all our modules.

What we would like to see as a first iteration:

  • Validations (terraform fmt, terraform validate, tflint)
  • Plan (and see the plan on the PR before merging)
  • Apply (will stay manual for now)

As we have a monorepo, we should make sure we don't trigger a plan/apply on all TF deployments when modifying a subset of them.

Work Items

  • [ ] Test and validate all the items we would like to have for CD for TF are available through Github Workflows
  • [ ] Design & doc to validate the setup with the team (with demo)
  • [ ] Setup in place for all our deployments + doc on how to add new deployments

tltran-legion avatar May 27 '22 12:05 tltran-legion