-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.terraform
48 lines (34 loc) · 928 Bytes
/
Makefile.terraform
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
export BWS_VER
BWS_VER="1.0.0"
plan:
bws run -- terraform plan
apply:
bws run -- terraform apply -auto-approve
console:
bws run -- terraform console
destroy:
bws run -- terraform destroy -auto-approve
prepare:
sudo apt update
sudo apt install -y curl git jq unzip
curl -LO \
"https://github.com/bitwarden/sdk/releases/download/bws-v$(BWS_VER)/bws-x86_64-unknown-linux-gnu-$(BWS_VER).zip"
sudo unzip -o bws-x86_64-unknown-linux-gnu-$(BWS_VER).zip -d /usr/local/bin
init:
tflint --init
bws run -- terraform init -backend-config="bucket=${GCS_BUCKET}"
lint:
terraform fmt
tflint
reconfigure:
bws run -- terraform init -reconfigure -backend-config="bucket=${GCS_BUCKET}"
refresh:
bws run -- terraform refresh
secrets:
bws secrets
state:
bws run -- terraform state list
validate: lint
bws run -- terraform validate
upgrade:
bws run -- terraform init -upgrade -backend-config="bucket=${GCS_BUCKET}"