Skip to content

Commit

Permalink
chore: updating inline with the template
Browse files Browse the repository at this point in the history
  • Loading branch information
gambol99 committed Dec 24, 2024
1 parent 6ab2671 commit 3f7e8d4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*.tfstate
*.tfstate.*

# terraform lock file
.terraform.lock.hcl

# Crash log files
crash.log
crash.*.log
Expand All @@ -30,15 +33,15 @@ terraform.rc
.DS_Store
todo.md

# Ignore vim swap files
*.swp
*.swo
# Ignore vim swap files
*.swp
*.swo

# Ignore meld diff files
*.orig
*.backup
*.rej
# Ignore meld diff files
*.orig
*.backup
*.rej

# Ignore lambda zip files and build directories
*.zip
*.zip
builds/
4 changes: 2 additions & 2 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
plugin "aws" {
enabled = true
version = "0.34.0"
version = "0.35.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}

plugin "terraform" {
enabled = true
version = "0.9.1"
version = "0.10.0"
source = "github.com/terraform-linters/tflint-ruleset-terraform"
}

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ upgrade-terraform-example-providers:
init:
@echo "--> Running terraform init"
@terraform init -backend=false
@find . -type f -name "*.tf" -not -path '*.terraform*' -exec dirname {} \; | sort -u | while read -r dir; do \
echo "--> Running terraform init in $$dir"; \
terraform -chdir=$$dir init -backend=false; \
done;

security:
security: init
@echo "--> Running Security checks"
@trivy config .
$(MAKE) security-modules
Expand All @@ -81,13 +85,15 @@ security-modules:
@echo "--> Running Security checks on modules"
@find . -type d -regex '.*/modules/[a-zA-Z\-_$$]*' -not -path '*.terraform*' 2>/dev/null | while read -r dir; do \
echo "--> Validating $$dir"; \
terraform init -backend=false; \
trivy config --format table --exit-code 1 --severity CRITICAL,HIGH --ignorefile .trivyignore $$dir; \
done;

security-examples:
@echo "--> Running Security checks on examples"
@find . -type d -path '*/examples/*' -not -path '*.terraform*' 2>/dev/null | while read -r dir; do \
echo "--> Validating $$dir"; \
terraform init -backend=false; \
trivy config --format table --exit-code 1 --severity CRITICAL,HIGH --ignorefile .trivyignore $$dir; \
done;

Expand Down

0 comments on commit 3f7e8d4

Please sign in to comment.