generated from appvia/terraform-aws-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: updating the reference to the module * chore: updateing the permissions on the pipelines * chore: reworking the module
- Loading branch information
Showing
14 changed files
with
269 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,26 +16,22 @@ | |
# | ||
AUTHOR_EMAIL[email protected] | ||
|
||
.PHONY: all security lint format documentation documentation-examples | ||
.PHONY: all security lint format documentation documentation-examples validate-all validate validate-examples init | ||
|
||
default: all | ||
|
||
all: | ||
$(MAKE) init | ||
$(MAKE) validate | ||
$(MAKE) security | ||
$(MAKE) lint | ||
$(MAKE) security | ||
$(MAKE) format | ||
$(MAKE) documentation | ||
$(MAKE) documentation-examples | ||
|
||
security: | ||
@echo "--> Running Security checks" | ||
@tfsec . | ||
|
||
documentation: | ||
@echo "--> Generating documentation" | ||
@terraform-docs markdown table --output-file ${PWD}/README.md --output-mode inject . | ||
$(MAKE) documentation-examples | ||
|
||
documentation-examples: | ||
@echo "--> Generating documentation examples" | ||
|
@@ -45,15 +41,58 @@ init: | |
@echo "--> Running terraform init" | ||
@terraform init -backend=false | ||
|
||
security: | ||
@echo "--> Running Security checks" | ||
@tfsec . | ||
$(MAKE) security-examples | ||
|
||
security-examples: | ||
@echo "--> Running Security checks on examples" | ||
@find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \ | ||
echo "--> Validating $$dir"; \ | ||
tfsec $$dir; \ | ||
done | ||
|
||
validate-all: | ||
@echo "--> Running all validation checks" | ||
$(MAKE) validate | ||
$(MAKE) validate-examples | ||
|
||
validate: | ||
@echo "--> Running terraform validate" | ||
@terraform init -backend=false | ||
@terraform validate | ||
$(MAKE) validate-examples | ||
|
||
validate-examples: | ||
@echo "--> Running terraform validate on examples" | ||
@find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \ | ||
echo "--> Validating $$dir"; \ | ||
terraform -chdir=$$dir init; \ | ||
terraform -chdir=$$dir validate; \ | ||
done | ||
|
||
lint: | ||
@echo "--> Running tflint" | ||
@tflint --init | ||
@tflint -f compact | ||
$(MAKE) lint-examples | ||
|
||
lint-examples: | ||
@echo "--> Running tflint on examples" | ||
@find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \ | ||
echo "--> Linting $$dir"; \ | ||
tflint --chdir=$$dir --init; \ | ||
tflint --chdir=$$dir -f compact; \ | ||
done | ||
|
||
format: | ||
@echo "--> Running terraform fmt" | ||
@terraform fmt -recursive -write=true | ||
|
||
clean: | ||
@echo "--> Cleaning up" | ||
@find . -type d -name ".terraform" | while read -r dir; do \ | ||
echo "--> Removing $$dir"; \ | ||
rm -rf $$dir; \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.