From 6527e2d4e7c489e231fcfae4fae102635f9eadc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Niesiob=C4=99dzki?= Date: Sat, 12 Nov 2022 19:37:01 +0100 Subject: [PATCH 1/2] Add note about TF_PLUGIN_CACHE_DIR --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c2d37a81..3f54e4ee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,6 +71,11 @@ pytest tests/examples Once everything looks good, add/commit any pending changes then push and open a PR on GitHub. We typically enforce a set of design and style conventions, so please make sure you have familiarized yourself with the following sections and implemented them in your code, to avoid lengthy review cycles. +HINT: if you work on high-latency or low-bandwidth network use `TF_PLUGIN_CACHE_DIR` environment variable to dramatically speed up the tests, for example +```bash +TF_PLUGIN_CACHE_DIR=/tmp/tfcache pytest tests +``` + ## Developer's handbook Over the years we have assembled a specific set of design principles and style conventions that allow for better readability and make understanding and changing code more predictable. From fb66a855262a1584684883767b07370bc8bd969f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Niesiob=C4=99dzki?= Date: Mon, 14 Nov 2022 10:21:20 +0100 Subject: [PATCH 2/2] Add note about `cache_dir` in terraformrc --- CONTRIBUTING.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f54e4ee..6ea1bb85 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,11 +71,16 @@ pytest tests/examples Once everything looks good, add/commit any pending changes then push and open a PR on GitHub. We typically enforce a set of design and style conventions, so please make sure you have familiarized yourself with the following sections and implemented them in your code, to avoid lengthy review cycles. -HINT: if you work on high-latency or low-bandwidth network use `TF_PLUGIN_CACHE_DIR` environment variable to dramatically speed up the tests, for example +HINT: if you work on high-latency or low-bandwidth network use `TF_PLUGIN_CACHE_DIR` environment variable to dramatically speed up the tests, for example: ```bash TF_PLUGIN_CACHE_DIR=/tmp/tfcache pytest tests ``` +Or just add into your [terraformrc](https://developer.hashicorp.com/terraform/cli/config/config-file): +``` +plugin_cache_dir = "$HOME/.terraform.d/plugin-cache" +``` + ## Developer's handbook Over the years we have assembled a specific set of design principles and style conventions that allow for better readability and make understanding and changing code more predictable.