github.com/Kevinklinger/open_terraform@v0.11.12-beta1/backend/local/cli.go (about) 1 package local 2 3 import ( 4 "github.com/hashicorp/terraform/backend" 5 ) 6 7 // backend.CLI impl. 8 func (b *Local) CLIInit(opts *backend.CLIOpts) error { 9 b.CLI = opts.CLI 10 b.CLIColor = opts.CLIColor 11 b.ContextOpts = opts.ContextOpts 12 b.OpInput = opts.Input 13 b.OpValidation = opts.Validation 14 b.RunningInAutomation = opts.RunningInAutomation 15 16 // Only configure state paths if we didn't do so via the configure func. 17 if b.StatePath == "" { 18 b.StatePath = opts.StatePath 19 b.StateOutPath = opts.StateOutPath 20 b.StateBackupPath = opts.StateBackupPath 21 } 22 23 return nil 24 }