github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/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.ShowDiagnostics = opts.ShowDiagnostics
    18  	b.ContextOpts = opts.ContextOpts
    19  
    20  	return nil
    21  }