Skip to content

Commit

Permalink
Pre-commit hook for fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
RaJiska committed Nov 14, 2023
1 parent 2605bd8 commit d013102
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: local
hooks:
- id: terraform_fmt
name: Terraform Format
entry: bash -c 'terraform fmt -recursive >/dev/null'
language: system
pass_filenames: false
stages: [commit]
2 changes: 1 addition & 1 deletion examples/full/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "aws_route_table" "public" {
}

resource "aws_route" "public_igw" {
route_table_id = aws_route_table.public.id
route_table_id = aws_route_table.public.id
destination_cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.gw.id

Expand Down

0 comments on commit d013102

Please sign in to comment.