You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ce/howto/custom-commands.mdx
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,6 @@ You can add extra arguments to the plan command by setting the `extra_args` key
45
45
However in some cases if you wish to override the plan command entirely you can do it by excluding the plan in the steps and having your command specified in the run like so:
46
46
47
47
```
48
-
49
48
workflows:
50
49
default:
51
50
plan:
@@ -55,4 +54,21 @@ workflows:
55
54
- run: terraform plan -input=false -refresh -no-color -out $DIGGER_PLANFILE
56
55
```
57
56
58
-
Note that you need to use the -out flag to write the output to the $DIGGER_PLANFILE env variable, since this will be used in postprocessing steps by digger.
57
+
Note that you need to use the -out flag to write the output to the $DIGGER_PLANFILE env variable, since this will be used in postprocessing steps by digger.
58
+
59
+
Similarly for the apply step you can use the $DIGGER_PLANFILE env variable to point to the plan file to apply. Note that this will only work when you have the [plan persistence](/ce/howto/store-plans-in-a-bucket)
60
+
configured. If plan persistence is not configured, the $DIGGER_PLANFILE environment variable will not be set during the apply step. Here is an example with both plan and apply commands overriden:
61
+
62
+
```
63
+
workflows:
64
+
default:
65
+
plan:
66
+
steps:
67
+
- init
68
+
- run: terraform plan -input=false -refresh -no-color -out $DIGGER_PLANFILE
0 commit comments