Speed up terraform run time in total#36
Conversation
…anges saved to plan file
There was a problem hiding this comment.
how about adding an input parameter (boolean) for cleanup? in most cases, cleanup of the plan is what we want and it's only for the "apply" case that we don't. this would avoid adding so much stuff to all the workflows!
alternatively we would use a "post" step for it, which would be ideal, but I believe it requires using a proper JS action rather that a composite one.
There was a problem hiding this comment.
let me think about it
There was a problem hiding this comment.
@jgiannuzzi i think it's now resolved. please take a look
| TF_WORKSPACE: ${{ inputs.tfc-workspace }} | ||
| run: | | ||
| terraform plan -no-color -input=false -out=tfplan | ||
| echo "plan-file=tfplan" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
this should be an absolute path to avoid confusion
| TF_WORKSPACE: ${{ inputs.tfc-workspace }} | ||
| run: | | ||
| terraform plan -no-color -input=false -out=tfplan | ||
| echo "plan-file=$(pwd)/tfplan" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
I think that outputting the plan file should be based on whether keep-plan is true, otherwise we can output a plan file even when there is none.
Add action cleanup-plan. Change terraform apply so that it applies changes saved to tfplan file