opentofu/builtin/providers/datadog/config.go
Otto Jongerius f407eea3f7 provider/datadog: Various enhancements
- Don't drop wildcard if it's the only one.
- Remove monitor resource, it's been replaced by metric_alert,
  outlier_alert and service_check
- Refactor to be closer to the API; each resource creates exactly *one*
  resource, not 2, this removes much unneeded complexity. A warning
  threshold is now supported by the API.
- Remove fuzzy resources like graph, and resources that used them for
  dashboard and screenboards. I'd welcome these resources, but the
  current state of Terraform and the Datadog API does not allow these to
  be implemented in a clean way.
- Support multiple thresholds for metric alerts, remove notify argument.
2016-02-22 15:02:50 -05:00

24 lines
405 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, error) {
client := datadog.NewClient(c.APIKey, c.APPKey)
log.Printf("[INFO] Datadog Client configured ")
return client, nil
}