mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Implement the Enterprise enhanced remote backend
This commit is contained in:
14
main.go
14
main.go
@@ -11,9 +11,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/mitchellh/colorstring"
|
||||
|
||||
"github.com/hashicorp/go-plugin"
|
||||
backendInit "github.com/hashicorp/terraform/backend/init"
|
||||
"github.com/hashicorp/terraform/command/format"
|
||||
"github.com/hashicorp/terraform/helper/logging"
|
||||
"github.com/hashicorp/terraform/svchost/disco"
|
||||
@@ -21,6 +20,7 @@ import (
|
||||
"github.com/mattn/go-colorable"
|
||||
"github.com/mattn/go-shellwords"
|
||||
"github.com/mitchellh/cli"
|
||||
"github.com/mitchellh/colorstring"
|
||||
"github.com/mitchellh/panicwrap"
|
||||
"github.com/mitchellh/prefixedio"
|
||||
)
|
||||
@@ -143,10 +143,16 @@ func wrappedMain() int {
|
||||
}
|
||||
}
|
||||
|
||||
// Get any configured credentials from the config and initialize
|
||||
// a service discovery object.
|
||||
credsSrc := credentialsSource(config)
|
||||
services := disco.NewWithCredentialsSource(credsSrc)
|
||||
|
||||
// Initialize the backends.
|
||||
backendInit.Init(services)
|
||||
|
||||
// In tests, Commands may already be set to provide mock commands
|
||||
if Commands == nil {
|
||||
credsSrc := credentialsSource(config)
|
||||
services := disco.NewWithCredentialsSource(credsSrc)
|
||||
initCommands(config, services)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user