Skip to content

Commit

Permalink
fix for master
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Jul 27, 2020
1 parent c99e159 commit e1ec34b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
tf_actions_version: 0.12.28
tf_actions_subcommand: "validate"
tf_actions_working_dir: "example/examplea"
- name: "Terraform fmt"
uses: hashicorp/terraform-github-actions@master
with:
tf_actions_version: 0.12.28
tf_actions_subcommand: "fmt -check"
tf_actions_working_dir: "example/examplea"
- name: Test with Checkov
run: |
pip install checkov
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
hooks:
- id: markdownlint
- repo: git://github.com/adrienverge/yamllint
rev: v1.23.0
rev: v1.24.2
hooks:
- id: yamllint
name: yamllint
Expand Down
28 changes: 24 additions & 4 deletions example/examplea/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
#Makefile
ifdef OS
BLAT = $(powershell -noprofile rm .\.terraform\ -force -recurse)
else
ifeq ($(shell uname), Linux)
RM = rm .terraform/modules/ -fr
BLAT= rm .terraform/ -fr
endif
endif

.PHONY: all

all: init plan build

init:
rm -rf .terraform/modules/
$(RM)
terraform init -reconfigure

plan: init
plan:
terraform plan -refresh=true

build: init
p:
terraform plan -refresh=true

apply: build

build:
terraform apply -auto-approve

check: init
Expand All @@ -24,5 +37,12 @@ docs:
terraform-docs md . > README.md

valid:
tflint
terraform fmt -check=true -diff=true
checkov -d . --external-checks-dir ../../checkov

target:
@read -p "Enter Module to target:" MODULE;
terraform apply -target $$MODULE

purge:
$(BLAT)
1 change: 1 addition & 0 deletions validate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Set-Location example/examplea
Remove-Item .terraform -force -Recurse -ErrorAction SilentlyContinue
terraform init
terraform validate
make valid
Pop-Location
1 change: 1 addition & 0 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ cd example/examplea || return
rm .terraform -fr
terraform init
terraform validate
make valid

0 comments on commit e1ec34b

Please sign in to comment.