Copy TF version to helper/schema provider

This commit is contained in:
Paul Tyng 2019-01-28 14:27:58 -05:00
parent 2383a2de59
commit bb9ae50279
No known key found for this signature in database
GPG Key ID: E518875D6C65835A
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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.