Skip to content

Commit

Permalink
Configure tflint and tf format
Browse files Browse the repository at this point in the history
  • Loading branch information
velotioaastha committed Sep 4, 2024
1 parent 2a5df47 commit def41c7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/pr-tflint-fmt.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/tf-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Terraform Lint and Format Check

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
terraform_checks:
name: Run Terraform Lint and Format Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: "~1"

- name: Install tflint
run: |
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- name: Run tflint
run: tflint

- name: Check Terraform formatting
run: terraform fmt -check -recursive

0 comments on commit def41c7

Please sign in to comment.