@@ -85,7 +85,7 @@ func (e executor) execParseJSON(ctx context.Context, args, env []string, v inter
85
85
}
86
86
87
87
func (e executor ) checkMinVersion (ctx context.Context ) error {
88
- v , err := e .getVersion (ctx )
88
+ v , err := e .version (ctx )
89
89
if err != nil {
90
90
return err
91
91
}
@@ -98,7 +98,7 @@ func (e executor) checkMinVersion(ctx context.Context) error {
98
98
return nil
99
99
}
100
100
101
- func (e executor ) getVersion (ctx context.Context ) (* version.Version , error ) {
101
+ func (e executor ) version (ctx context.Context ) (* version.Version , error ) {
102
102
// #nosec
103
103
cmd := exec .CommandContext (ctx , e .binaryPath , "version" , "-json" )
104
104
out , err := cmd .Output ()
@@ -234,7 +234,7 @@ func (e executor) apply(ctx context.Context, env, vars []string, logger provisio
234
234
}
235
235
236
236
func (e executor ) stateResources (ctx context.Context ) ([]* proto.Resource , error ) {
237
- state , err := e .getState (ctx )
237
+ state , err := e .state (ctx )
238
238
if err != nil {
239
239
return nil , err
240
240
}
@@ -252,12 +252,12 @@ func (e executor) stateResources(ctx context.Context) ([]*proto.Resource, error)
252
252
return resources , nil
253
253
}
254
254
255
- func (e executor ) getState (ctx context.Context ) (* tfjson.State , error ) {
255
+ func (e executor ) state (ctx context.Context ) (* tfjson.State , error ) {
256
256
args := []string {"show" , "-json" }
257
257
state := & tfjson.State {}
258
258
err := e .execParseJSON (ctx , args , e .basicEnv (), state )
259
259
if err != nil {
260
- return nil , xerrors .Errorf ("get terraform state: %w" , err )
260
+ return nil , xerrors .Errorf ("terraform show state: %w" , err )
261
261
}
262
262
return state , nil
263
263
}
0 commit comments