File tree 1 file changed +20
-8
lines changed 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 1
1
# shellcheck shell=bash
2
- about-alias ' Aliases for Terraform and Terragrunt'
2
+ about-alias ' Aliases for Terraform/OpenTofu and Terragrunt'
3
3
4
- alias tf=' terraform'
5
- alias tfi=' tf init'
6
- alias tfv=' terraform validate'
7
- alias tfp=' terraform plan'
8
- alias tfa=' terraform apply'
9
- alias tfd=' terraform destroy'
10
- alias tfw=' terraform workspace'
4
+ if _command_exists terraform; then
5
+ alias tf=' terraform'
6
+ elif _command_exists tofu; then
7
+ alias tf=' tofu'
8
+ fi
9
+
10
+ if _command_exists tf; then
11
+ alias tfa=' tf apply'
12
+ alias tfp=' tf plan'
13
+ alias tfd=' tf destroy'
14
+ alias tfv=' tf validate'
15
+ alias tfi=' tf init'
16
+ alias tfo=' tf output'
17
+ alias tfr=' tf refresh'
18
+ alias tfw=' tf workspace'
19
+ alias tfae=' tf apply -auto-approve'
20
+ alias tfpa=' tf plan -out=tfplan && tf apply tfplan'
21
+ alias tfpaf=' tf plan -out=tfplan && tf apply -auto-approve tfplan'
22
+ fi
You can’t perform that action at this time.
0 commit comments