-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
96 lines (67 loc) · 2.23 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#####################################################
# Makefile containing shortcut commands for project #
#####################################################
# MACOS USERS:
# Make should be installed with XCode dev tools.
# If not, run `xcode-select --install` in Terminal to install.
# WINDOWS USERS:
# 1. Install Chocolately package manager: https://chocolatey.org/
# 2. Open Command Prompt in administrator mode
# 3. Run `choco install make`
# 4. Restart all Git Bash/Terminal windows.
.PHONY: create-dev update-dev
create-dev:
python3 -m venv .venv; \
. .venv/bin/activate; \
pip install --upgrade poetry; \
poetry install; \
pre-commit install;
update-dev:
. .venv/bin/activate; \
poetry update;
.PHONY: docker-clean docker-down docker-force docker-logs docker-start docker-stop docker-up
docker-clean:
docker-compose down --rmi all --volumes
docker-down:
docker-compose down --remove-orphans
docker-force:
docker-compose up --force-recreate
docker-logs:
docker-compose logs -f
docker-start:
docker-compose start
docker-stop:
docker-compose stop
docker-up:
docker-compose up
.PHONY: tf-apply tf-check tf-destroy tf-fmt tf-init tf-init-ms tf-init-r tf-init-u tf-plan tf-state tf-validate tf-workspace-list tf-workspace-production tf-workspace-staging
tf-apply:
docker-compose run --rm bd_terraform apply
tf-apply-ro:
docker-compose run --rm bd_terraform apply -refresh-only
tf-check:
docker-compose run --rm bd_terraform fmt -check
tf-destroy:
docker-compose run --rm bd_terraform destroy
tf-fmt:
docker-compose run --rm bd_terraform fmt --recursive
tf-init:
docker-compose run --rm bd_terraform init
tf-init-ms:
docker-compose run --rm bd_terraform init -migrate-state
tf-init-r:
docker-compose run --rm bd_terraform init -reconfigure
tf-init-u:
docker-compose run --rm bd_terraform init -upgrade
tf-plan:
docker-compose run --rm bd_terraform plan
tf-state:
docker-compose run --rm bd_terraform state list
tf-validate:
docker-compose run --rm bd_terraform validate
tf-workspace-list:
docker-compose run --rm bd_terraform workspace list
tf-workspace-production:
docker-compose run --rm bd_terraform workspace select production
tf-workspace-staging:
docker-compose run --rm bd_terraform workspace select staging