github.com/hugorut/terraform@v1.1.3/src/cloud/backend_cli.go (about)

     1  package cloud
     2  
     3  import (
     4  	"github.com/hugorut/terraform/src/backend"
     5  )
     6  
     7  // CLIInit implements backend.CLI
     8  func (b *Cloud) 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  	b.runningInAutomation = opts.RunningInAutomation
    19  
    20  	return nil
    21  }