Skip to content

Shared "Cache" of Terraform Providers #810

Closed Answered by yhakbar
dhoffman-vertex asked this question in How do I
Discussion options

You must be logged in to vote

Hey @dhoffman-vertex !

There is a long, in-depth discussion about this topic here.

The TLDR is that you can use standard provider plugin caching, but you can experience errors when running multiple Terragrunt operations concurrently while using it, as Terraform has no locking mechanism that makes it safe to access from multiple concurrent sources.

The simplest way to mitigate that drawback is to init with a parallelism of 1, then run the operation you want without limiting parallelism. That will populate the shared provider cache in a sequential fashion, then the plan, apply, etc can be run in parallel.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dhoffman-vertex
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants