-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
42 lines (36 loc) · 1.15 KB
/
Justfile
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
refresh:
#!/usr/bin/env fish
source scripts/get_state_passphrase.sh
tofu init; or return
tofu refresh -parallelism=10
plan:
#!/usr/bin/env fish
source scripts/get_state_passphrase.sh
tofu init; or return
tofu plan -refresh=false -parallelism=10
plan_resources:
#!/usr/bin/env fish
source scripts/get_state_passphrase.sh
tofu plan -refresh=false -parallelism=10 2&>1 | rg '^\s+# (module[\.\w\[\]"/]+).*$$' -r '$$1'
apply:
#!/usr/bin/env fish
echo -e "initializing..."
source scripts/get_state_passphrase.sh
tofu init; or return
tofu apply -refresh=false -parallelism=10; or return
echo -e "writing graphs..."
tofu graph | terraform-graph-beautifier --output-type=cyto-html > graphs/graph.html
# this graph is possible to make, but not as pretty at the html version
# tofu graph | terraform-graph-beautifier --output-type=graphviz | dot -T svg > graphs/graph.svg
init:
#!/usr/bin/env fish
source scripts/get_state_passphrase.sh
tofu init
console:
#!/usr/bin/env fish
source scripts/get_state_passphrase.sh
tofu console -plan
upgrade:
#!/usr/bin/env fish
source scripts/get_state_passphrase.sh
tofu init -upgrade