add terraform testing to CI

This commit is contained in:
talithafrsc 2024-10-24 17:36:18 +07:00
parent cf2597c60c
commit 9eaebade69

18
github-actions.yml Normal file
View file

@ -0,0 +1,18 @@
name: CI
on:
push:
branches: [ dev ]
jobs:
terraform-test:
runs-on: ubuntu-latest
container: cedricguadalupe/terraform-gcloud
steps:
- name: Set GCP project
run: gcloud config set project $PROJECT_ID
- name: Setup GCP authentication
run: echo "$BASE64_ENV_VAR" | base64 --decode > output_file.txt
- run: gcloud auth activate-service-account --key-file output_file.txt
- name: Initiate Terraform
run: terraform init
- name: Dry run Terraform
run: terraform plan