I've been learning a bit about Terraform this past month and thought it would be cool to leverage IaC in a CI/CD environment with GitHub Actions!
My workflow runs terratest to test the infrastructure then initializes, formats, plans, and applies changes based on the Terraform configuration. Changes are applied after a pull request has been merged.
To ensure Terraform runs in the correct directory the commit and PR message should be the directory name.
Testing and provisioning infrastructure with Terraform and Github Actions
Actions used in my workflow