Skip to content

Commit

Permalink
Copy TF version to helper/schema provider
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Jan 28, 2019
1 parent 2383a2d commit bb9ae50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helper/plugin/grpc_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions helper/schema/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bb9ae50

Please sign in to comment.