From c4d93bbdc661b7da47d4a5d3be9f1bceaa3860d8 Mon Sep 17 00:00:00 2001 From: Rashit Azizbaev Date: Wed, 11 Aug 2021 09:06:06 +0300 Subject: [PATCH] Lookup terraform binary in system path before attempting to install it --- internal/provider/generate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/provider/generate.go b/internal/provider/generate.go index 2e7235fa..2d3ea910 100644 --- a/internal/provider/generate.go +++ b/internal/provider/generate.go @@ -494,7 +494,7 @@ provider %[1]q { return nil, err } - tfBin, err := tfinstall.Find(ctx, tfinstall.ExactVersion("0.13.2", tmpDir)) + tfBin, err := tfinstall.Find(ctx, tfinstall.LookPath(), tfinstall.ExactVersion("0.13.2", tmpDir)) if err != nil { return nil, err }