Skip to content

Commit a99936b

Browse files
vara-bonthubonclay7
authored andcommitted
Added gitignore and pre-commit files
1 parent de50a0d commit a99936b

File tree

2 files changed

+57
-24
lines changed

2 files changed

+57
-24
lines changed

.gitignore

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
build/
2-
plan.out
3-
plan.out.json
1+
.DS_Store
2+
.idea
3+
.build
44

55
# Local .terraform directories
6-
.terraform/
6+
**/.terraform/*
7+
8+
# Terraform lockfile
9+
.terraform.lock.hcl
710

811
# .tfstate files
912
*.tfstate
1013
*.tfstate.*
14+
*.tfplan
1115

1216
# Crash log files
1317
crash.log
@@ -16,7 +20,6 @@ crash.log
1620
# password, private keys, and other secrets. These should not be part of version
1721
# control as they are data points which are potentially sensitive and subject
1822
# to change depending on the environment.
19-
#
2023
*.tfvars
2124

2225
# Ignore override files as they are usually used to override resources locally and so
@@ -26,17 +29,18 @@ override.tf.json
2629
*_override.tf
2730
*_override.tf.json
2831

29-
# Include override files you do wish to add to version control using negated pattern
30-
#
31-
# !example_override.tf
32-
33-
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
34-
# example: *tfplan*
35-
3632
# Ignore CLI configuration files
3733
.terraformrc
3834
terraform.rc
39-
.terraform.lock.hcl
4035

41-
go.mod
42-
go.sum
36+
# Locals
37+
kubeconfig*
38+
kube-config*
39+
local_tf_state/
40+
.vscode
41+
.gitallowed
42+
site
43+
.env*
44+
45+
# Checks
46+
.tfsec

.pre-commit-config.yaml

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
1-
---
2-
fail_fast: false
3-
minimum_pre_commit_version: "2.6.0"
41
repos:
5-
-
6-
repo: https://github.com/aws-ia/pre-commit-configs
7-
# To update run:
8-
# pre-commit autoupdate --freeze
9-
rev: 80ed3f0a164f282afaac0b6aec70e20f7e541932 # frozen: v1.5.0
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
104
hooks:
11-
- id: aws-ia-meta-hook
5+
- id: trailing-whitespace
6+
args: ['--markdown-linebreak-ext=md']
7+
- id: end-of-file-fixer
8+
- id: check-merge-conflict
9+
- id: detect-private-key
10+
- id: detect-aws-credentials
11+
args: ['--allow-missing-credentials']
12+
- repo: https://github.com/antonbabenko/pre-commit-terraform
13+
rev: v1.74.1
14+
hooks:
15+
- id: terraform_fmt
16+
- id: terraform_docs
17+
args:
18+
- '--args=--lockfile=false'
19+
- id: terraform_validate
20+
exclude: deploy
21+
- id: terraform_tflint
22+
args:
23+
- '--args=--only=terraform_deprecated_interpolation'
24+
- '--args=--only=terraform_deprecated_index'
25+
- '--args=--only=terraform_unused_declarations'
26+
- '--args=--only=terraform_comment_syntax'
27+
- '--args=--only=terraform_documented_outputs'
28+
- '--args=--only=terraform_documented_variables'
29+
- '--args=--only=terraform_typed_variables'
30+
- '--args=--only=terraform_module_pinned_source'
31+
- '--args=--only=terraform_naming_convention'
32+
- '--args=--only=terraform_required_version'
33+
- '--args=--only=terraform_required_providers'
34+
- '--args=--only=terraform_standard_module_structure'
35+
- '--args=--only=terraform_workspace_remote'
36+
- id: terraform_tfsec
37+
files: ^examples/ # only scan `examples/*` which are the implementation
38+
args:
39+
- --args=--config-file=__GIT_WORKING_DIR__/tfsec.yaml
40+
- --args=--concise-output

0 commit comments

Comments
 (0)