#34634·terraform

Module cache

Author: tmccombsCreated Feb 7, 2024Updated Sep 8, 2026
Labelsenhancementnew

Terraform Version

Terraform v1.7.2
on linux_amd64

Use Cases

Currently whenever you use a remote module, terraform has to download it and put it in .terraform/modules.

In cases where you have the same module used in many different workspaces, this results in wasting a lot of time and disk space downloading the same module over and over again.

Attempted Solutions

I don't really know of any solutions besides just re-downloading the file every time.

Or maybe doing some kind of pre-download and changing the source of the module to point to the local file. But that doesn't work very well if you are using terraform cloud or enterprise to run terraform.

Proposal

Have a cache for modules similar to the provider cache.

References

No response