opentofu/builtin/providers/datadog/config.go
Otto Jongerius 10d68d90dd provider/datadog 9869: Validate credentials when initialising client. (#10567)
* provider/datadog 9869: Validate credentials when initialising client.

* provider/datadog Pull in new version of go-datadog-api.

* provider/datadog Update testAccCheckDatadogMonitorConfigNoThresholds test config.
2016-12-08 11:17:42 +01:00

23 lines
390 B
Go

package datadog
import (
"log"
"github.com/zorkian/go-datadog-api"
)
// Config holds API and APP keys to authenticate to Datadog.
type Config struct {
APIKey string
APPKey string
}
// Client returns a new Datadog client.
func (c *Config) Client() *datadog.Client {
client := datadog.NewClient(c.APIKey, c.APPKey)
log.Printf("[INFO] Datadog Client configured ")
return client
}