From bb9ae50279a8b27a8456b6952a674b34306747b4 Mon Sep 17 00:00:00 2001 From: Paul Tyng Date: Mon, 28 Jan 2019 14:27:58 -0500 Subject: [PATCH] Copy TF version to helper/schema provider --- helper/plugin/grpc_provider.go | 2 ++ helper/schema/provider.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/helper/plugin/grpc_provider.go b/helper/plugin/grpc_provider.go index fdbf0a840..8e6f8b463 100644 --- a/helper/plugin/grpc_provider.go +++ b/helper/plugin/grpc_provider.go @@ -390,6 +390,8 @@ func (s *GRPCProviderServer) Configure(_ context.Context, req *proto.Configure_R return resp, nil } + s.provider.TerraformVersion = req.TerraformVersion + config := terraform.NewResourceConfigShimmed(configVal, block) err = s.provider.Configure(config) resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err) diff --git a/helper/schema/provider.go b/helper/schema/provider.go index 7d7503d6d..97024479d 100644 --- a/helper/schema/provider.go +++ b/helper/schema/provider.go @@ -64,6 +64,8 @@ type Provider struct { stopCtx context.Context stopCtxCancel context.CancelFunc stopOnce sync.Once + + TerraformVersion string } // ConfigureFunc is the function used to configure a Provider.