How-to use caching #262
Replies: 1 comment
-
The actions try and cache the terraform binary and plugins on disk, but if you are using github hosted runners (or ephemeral self-hosted runners) the cache will start empty for each job. There was previous discussion in #105. Essentially, If you know the path to the cache on disk you can use it with actions/cache to save and restore those paths and carry the cache between jobs. Today, On github hosted runners you should be able to cache terraform plugins using the path: This shouldn't be two paths - in the future everything will be moved under the second path. I haven't actually tested this myself so it would be great to see a working example. |
Beta Was this translation helpful? Give feedback.
-
I am currently looking at ways to reduce GitHub Actions workflow durations and one possible optimisation could be to cache the Terraform CLI, provider plugins and modules.
My understanding is that:
I am expecting that their may be some performance benefit (maybe a small one) in saving these to the GitHub Actions cache between runs to avoid the multiple downloads that take place.
Workflow caching for Terraform is not something that I have attempted before...
Does anyone have experience of implementing any of this with the dflook actions?
Does anyone have any opinions on why it might not be a good idea or not be possible?
Beta Was this translation helpful? Give feedback.
All reactions