provider/google: Log HTTP requests and responses in DEBUG mode (#14281)

This commit is contained in:
Radek Simko 2017-05-10 21:16:43 +02:00 committed by GitHub
parent 4c8f6d1dc0
commit 192c359131

View File

@ -8,6 +8,7 @@ import (
"runtime"
"strings"
"github.com/hashicorp/terraform/helper/logging"
"github.com/hashicorp/terraform/helper/pathorcontents"
"github.com/hashicorp/terraform/terraform"
"golang.org/x/oauth2"
@ -95,6 +96,8 @@ func (c *Config) loadAndValidate() error {
}
}
client.Transport = logging.NewTransport("Google", client.Transport)
versionString := terraform.VersionString()
userAgent := fmt.Sprintf(
"(%s %s) Terraform/%s", runtime.GOOS, runtime.GOARCH, versionString)