github.com/ctrox/terraform@v0.11.12-beta1/backend/remote/cli.go (about)

     1  package remote
     2  
     3  import (
     4  	"github.com/hashicorp/terraform/backend"
     5  )
     6  
     7  // CLIInit implements backend.CLI
     8  func (b *Remote) CLIInit(opts *backend.CLIOpts) error {
     9  	if cli, ok := b.local.(backend.CLI); ok {
    10  		if err := cli.CLIInit(opts); err != nil {
    11  			return err
    12  		}
    13  	}
    14  
    15  	b.CLI = opts.CLI
    16  	b.CLIColor = opts.CLIColor
    17  	b.ContextOpts = opts.ContextOpts
    18  
    19  	return nil
    20  }