mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-27 00:46:25 -06:00
ebcf7455eb
* Rename module name from "github.com/hashicorp/terraform" to "github.com/placeholderplaceholderplaceholder/opentf". Signed-off-by: Jakub Martin <kubam@spacelift.io> * Gofmt. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Regenerate protobuf. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix comments. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo issue and pull request link changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo comment changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix comment. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo some link changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * make generate && make protobuf Signed-off-by: Jakub Martin <kubam@spacelift.io> --------- Signed-off-by: Jakub Martin <kubam@spacelift.io>
36 lines
971 B
Go
36 lines
971 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package local
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/placeholderplaceholderplaceholder/opentf/internal/backend"
|
|
)
|
|
|
|
// backend.CLI impl.
|
|
func (b *Local) CLIInit(opts *backend.CLIOpts) error {
|
|
b.ContextOpts = opts.ContextOpts
|
|
b.OpInput = opts.Input
|
|
b.OpValidation = opts.Validation
|
|
|
|
// configure any new cli options
|
|
if opts.StatePath != "" {
|
|
log.Printf("[TRACE] backend/local: CLI option -state is overriding state path to %s", opts.StatePath)
|
|
b.OverrideStatePath = opts.StatePath
|
|
}
|
|
|
|
if opts.StateOutPath != "" {
|
|
log.Printf("[TRACE] backend/local: CLI option -state-out is overriding state output path to %s", opts.StateOutPath)
|
|
b.OverrideStateOutPath = opts.StateOutPath
|
|
}
|
|
|
|
if opts.StateBackupPath != "" {
|
|
log.Printf("[TRACE] backend/local: CLI option -backup is overriding state backup path to %s", opts.StateBackupPath)
|
|
b.OverrideStateBackupPath = opts.StateBackupPath
|
|
}
|
|
|
|
return nil
|
|
}
|