Merge pull request #1356 from koendc/b-remote-plugin-case

command/state: fix for state files containing an upper case remote type
This commit is contained in:
Mitchell Hashimoto 2015-04-14 08:34:28 -07:00
commit e91b5136bf
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/hashicorp/errwrap"
"github.com/hashicorp/terraform/state"
@ -208,7 +209,7 @@ func remoteState(
}
// Initialize the remote client based on the local state
client, err := remote.NewClient(local.Remote.Type, local.Remote.Config)
client, err := remote.NewClient(strings.ToLower(local.Remote.Type), local.Remote.Config)
if err != nil {
return nil, errwrap.Wrapf(fmt.Sprintf(
"Error initializing remote driver '%s': {{err}}",