---
name: auto-provider-cache-dir
status: completed
---

Enable native OpenTofu provider caching by setting `TF_PLUGIN_CACHE_DIR` instead of using Terragrunt's internal provider cache server.

### `auto-provider-cache-dir` - What it does
This experiment automatically configures OpenTofu to use its built-in provider caching mechanism by setting the `TF_PLUGIN_CACHE_DIR` environment variable. This approach leverages OpenTofu's native provider caching capabilities, which are more robust for concurrent operations in OpenTofu 1.10+.

This experiment flag is no longer needed, as the auto-provider-cache-dir feature is now enabled by default when using OpenTofu >= 1.10.

**Requirements:**

- OpenTofu version >= 1.10 is required
- Only works when using OpenTofu (not Terraform)

**Disabling the feature:**

You can disable the auto-provider-cache-dir feature using the `--no-auto-provider-cache-dir` flag:

```bash
terragrunt run --all apply --no-auto-provider-cache-dir
```

### `auto-provider-cache-dir` - How to provide feedback
Now that the auto-provider-cache-dir experiment is complete, please provide feedback in the form of standard [GitHub issues](https://github.com/gruntwork-io/terragrunt/issues).

### `auto-provider-cache-dir` - Criteria for stabilization
To transition the `auto-provider-cache-dir` feature to stable, the following have been completed:

- [x] Comprehensive testing to confirm the safety of concurrent runs using the same provider cache directory.
- [x] Performance comparison with the existing provider cache server approach.
- [x] Documentation and examples of best practices for usage.
- [x] Community feedback on real-world usage and any edge cases discovered.
