Skip to content

Added workflow to deploy with Terraform #1

Added workflow to deploy with Terraform

Added workflow to deploy with Terraform #1

Workflow file for this run

name: 'Terraform'
on:
push:
branches: [ "cloud" ]
permissions:
contents: read
jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-latest
environment: production
defaults:
run:
shell: bash
working-directory: ./terraform
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: Terraform Init
run: terraform init
- name: Terraform Format
run: terraform fmt -check
- name: Terraform Plan
run: terraform plan -input=false
- name: Terraform Apply
if: github.ref == 'refs/heads/"cloud"' && github.event_name == 'push'
run: terraform apply -auto-approve -input=false