github.com/sixgill/terraform@v0.9.0-beta2.0.20170316214032-033f6226ae50/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  
    15  	// Only configure state paths if we didn't do so via the configure func.
    16  	if b.StatePath == "" {
    17  		b.StatePath = opts.StatePath
    18  		b.StateOutPath = opts.StateOutPath
    19  		b.StateBackupPath = opts.StateBackupPath
    20  	}
    21  
    22  	return nil
    23  }