diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix index 6cd2cf52efc..be331156eed 100644 --- a/pkgs/applications/networking/cluster/terraform/default.nix +++ b/pkgs/applications/networking/cluster/terraform/default.nix @@ -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 diff --git a/pkgs/applications/networking/cluster/terraform/provider-path-0_15.patch b/pkgs/applications/networking/cluster/terraform/provider-path-0_15.patch new file mode 100644 index 00000000000..1896d6018f0 --- /dev/null +++ b/pkgs/applications/networking/cluster/terraform/provider-path-0_15.patch @@ -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 + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ab2ef5d68f4..c99c57aa171 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30331,6 +30331,7 @@ in terraform_0_12 terraform_0_13 terraform_0_14 + terraform_0_15 terraform_plugins_test ;