forked from dwp/docker-prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 1.1 KB
/
Makefile
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
34
35
36
37
38
SHELL:=bash
default: help
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: bootstrap
bootstrap: ## Bootstrap local environment for first use
make git-hooks
pip3 install --user Jinja2 PyYAML boto3
@{ \
export AWS_PROFILE=$(aws_profile); \
export AWS_REGION=$(aws_region); \
python3 bootstrap_terraform.py; \
}
terraform fmt -recursive
.PHONY: initial-commit
initial-commit: ## Rename template files
./initial-commit.sh
.PHONY: terraform-init
terraform-init: ## Run `terraform init` from repo root
terraform init terraform/deploy/
.PHONY: terraform-plan
terraform-plan: ## Run `terraform plan` from repo root
terraform plan -var-file=terraform/deploy/terraform.tfvars terraform/deploy/
.PHONY: terraform-apply
terraform-apply: ## Run `terraform apply` from repo root
terraform apply -var-file=terraform/deploy/terraform.tfvars terraform/deploy/
.PHONY: git-hooks
git-hooks: ## Set up hooks in .githooks
@git submodule update --init .githooks ; \
git config core.hooksPath .githooks \