diff -Naur terraform.old/internal/command/init.go terraform.new/internal/command/init.go --- terraform.old/internal/command/init.go +++ terraform.new/internal/command/init.go @@ -7,6 +7,7 @@ "context" "errors" "fmt" + "os" "log" "reflect" "sort" @@ -79,6 +80,11 @@ c.migrateState = true } + val, ok := os.LookupEnv("NIX_TERRAFORM_PLUGIN_DIR") + if ok { + initArgs.PluginPath = append(initArgs.PluginPath, val) + } + if len(initArgs.PluginPath) > 0 { c.pluginPath = initArgs.PluginPath }