Add terraform apply step #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: infrastructure | |
on: push | |
env: | |
GOOGLE_BACKEND_CREDENTIALS: ${{ secrets.GOOGLE_BACKEND_CREDENTIALS }} | |
defaults: | |
run: | |
working-directory: ./terraform | |
jobs: | |
test-job: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- uses: hashicorp/setup-terraform@v3 | |
name: Install terraform v1.9.2 | |
with: | |
terraform_version: "1.9.2" | |
- name: Terraform init | |
run: terraform init | |
- name: Terraform validate | |
run: terraform validate | |
- name: Terraform plan | |
run: terraform plan -out default.tfplan | |
continue-on-error: false | |
- name: Terraform apply | |
run: terraform apply default.tfplan |