Mario Rodas 2021-04-15 00:00:00 +00:00
parent dcdf30a78a
commit e18275de12
3 changed files with 32 additions and 0 deletions

View File

@ -164,6 +164,14 @@ in rec {
passthru = { inherit plugins; };
});
terraform_0_15 = pluggable (generic {
version = "0.15.0";
sha256 = "0d7hai57x6qczacdnzzvs3766180n6grmq0a7rlw5jp3zgzp8bmr";
vendorSha256 = "1l67kkrk8jw7v1rqpwj6n0l7lvmfgf1ir430j1n96459s1dzf0cn";
patches = [ ./provider-path-0_15.patch ];
passthru = { inherit plugins; };
});
# Tests that the plugins are being used. Terraform looks at the specific
# file pattern and if the plugin is not found it will try to download it
# from the Internet. With sandboxing enable this test will fail if that is

View File

@ -0,0 +1,23 @@
diff -Naur terraform.old/command/init.go terraform.new/command/init.go
--- terraform.old/command/init.go
+++ terraform.new/command/init.go
@@ -3,6 +3,7 @@
import (
"context"
"fmt"
+ "os"
"log"
"strings"
@@ -55,6 +56,11 @@
var diags tfdiags.Diagnostics
+ val, ok := os.LookupEnv("NIX_TERRAFORM_PLUGIN_DIR")
+ if ok {
+ flagPluginPath = append(flagPluginPath, val)
+ }
+
if len(flagPluginPath) > 0 {
c.pluginPath = flagPluginPath
}

View File

@ -30327,6 +30327,7 @@ in
terraform_0_12
terraform_0_13
terraform_0_14
terraform_0_15
terraform_plugins_test
;