forked from poanetwork/blockscout-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 881 Bytes
/
Makefile
File metadata and controls
33 lines (26 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: help
IMAGE_NAME ?= poa-aws
INFRA_PREFIX ?= poa-example
KEY_PAIR ?= poa
help:
@echo "$(IMAGE_NAME)"
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
check: lint ## Run linters and validation
@bin/infra precheck
@terraform validate -var-file=ignore.tfvars base
@if [ -f main.tfvars ]; then \
terraform validate \
-var='db_password=foo' \
-var='new_relic_app_name=foo' \
-var='new_relic_license_key=foo' \
-var-file=main.tfvars main; \
fi
@rm ignore.tfvars
format: ## Apply canonical formatting to Terraform files
@terraform fmt
lint: shellcheck check-format ## Lint scripts and config files
check-format:
@terraform fmt -check=true
shellcheck:
@shellcheck --shell=bash bin/infra
@shellcheck --shell=bash modules/stack/libexec/init.sh