mirror of https://github.com/hashicorp/terraform
Merge pull request #12308 from hashicorp/b-backend-cliinit
command: use backend.CLIInitpull/12309/head
commit
5e533c2ea1
@ -0,0 +1,23 @@
|
||||
package local
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform/backend"
|
||||
)
|
||||
|
||||
// backend.CLI impl.
|
||||
func (b *Local) CLIInit(opts *backend.CLIOpts) error {
|
||||
b.CLI = opts.CLI
|
||||
b.CLIColor = opts.CLIColor
|
||||
b.ContextOpts = opts.ContextOpts
|
||||
b.OpInput = opts.Input
|
||||
b.OpValidation = opts.Validation
|
||||
|
||||
// Only configure state paths if we didn't do so via the configure func.
|
||||
if b.StatePath == "" {
|
||||
b.StatePath = opts.StatePath
|
||||
b.StateOutPath = opts.StateOutPath
|
||||
b.StateBackupPath = opts.StateBackupPath
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Loading…
Reference in new issue