Merge pull request #20137 from hashicorp/f/tf-version

Copy TF version to helper/schema provider
This commit is contained in:
Paul Tyng 2019-01-28 14:58:21 -05:00 committed by GitHub
commit 50e2b1856e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.