We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c9f607 commit 63ab8adCopy full SHA for 63ab8ad
grafana/provider.go
@@ -1,6 +1,7 @@
1
package grafana
2
3
import (
4
+ "github.com/hashicorp/terraform/helper/logging"
5
"github.com/hashicorp/terraform/helper/schema"
6
"github.com/hashicorp/terraform/terraform"
7
@@ -38,8 +39,15 @@ func Provider() terraform.ResourceProvider {
38
39
}
40
41
func providerConfigure(d *schema.ResourceData) (interface{}, error) {
- return gapi.New(
42
+ client, err := gapi.New(
43
d.Get("auth").(string),
44
d.Get("url").(string),
45
)
46
+ if err != nil {
47
+ return nil, err
48
+ }
49
+
50
+ client.Transport = logging.NewTransport("Grafana", client.Transport)
51
52
+ return client, nil
53
0 commit comments