diff --git a/datadog/resource_datadog_security_monitoring_rule.go b/datadog/resource_datadog_security_monitoring_rule.go index 3e7c955a18..9aa783c728 100644 --- a/datadog/resource_datadog_security_monitoring_rule.go +++ b/datadog/resource_datadog_security_monitoring_rule.go @@ -240,14 +240,15 @@ func datadogSecurityMonitoringRuleSchema() map[string]*schema.Schema { }, "metric": { Type: schema.TypeString, + Deprecated: "Configure `metrics` instead. This attribute will be removed in the next major version of the provider.", Optional: true, - Description: "The target field to aggregate over when using the `sum`, `max`, or `new_value` aggregations.", + Description: "**Deprecated** The target field to aggregate over when using the `sum`, `max`, or `geo_data` aggregations.", }, "metrics": { Type: schema.TypeList, Computed: true, Optional: true, - Description: "Group of target fields to aggregate over when using the new value aggregations.", + Description: "Group of target fields to aggregate over when using the `sum`, `max`, `geo_data`, or `new_value` aggregations. The `sum`, `max`, and `geo_data` aggregations only accept one value in this list, whereas the `new_value` aggregation accepts up to five values.", Elem: &schema.Schema{Type: schema.TypeString}, }, "name": { diff --git a/docs/resources/security_monitoring_rule.md b/docs/resources/security_monitoring_rule.md index af33886936..27791c4e0c 100644 --- a/docs/resources/security_monitoring_rule.md +++ b/docs/resources/security_monitoring_rule.md @@ -148,8 +148,8 @@ Optional: - `aggregation` (String) The aggregation type. For Signal Correlation rules, it must be event_count. Valid values are `count`, `cardinality`, `sum`, `max`, `new_value`, `geo_data`, `event_count`. - `distinct_fields` (List of String) Field for which the cardinality is measured. Sent as an array. - `group_by_fields` (List of String) Fields to group by. -- `metric` (String) The target field to aggregate over when using the `sum`, `max`, or `new_value` aggregations. -- `metrics` (List of String) Group of target fields to aggregate over when using the new value aggregations. +- `metric` (String, Deprecated) **Deprecated** The target field to aggregate over when using the `sum`, `max`, or `geo_data` aggregations. **Deprecated.** Configure `metrics` instead. This attribute will be removed in the next major version of the provider. +- `metrics` (List of String) Group of target fields to aggregate over when using the `sum`, `max`, `geo_data`, or `new_value` aggregations. The `sum`, `max`, and `geo_data` aggregations only accept one value in this list, whereas the `new_value` aggregation accepts up to five values. - `name` (String) Name of the query. Not compatible with `new_value` aggregations. diff --git a/go.mod b/go.mod index 7e308917b1..cec3a1486c 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/terraform-providers/terraform-provider-datadog require ( - github.com/DataDog/datadog-api-client-go/v2 v2.3.2-0.20221013130632-7ce5b4f69ecd + github.com/DataDog/datadog-api-client-go/v2 v2.3.2-0.20221021143944-ddf9f44ef204 github.com/DataDog/dd-sdk-go-testing v0.0.0-20211116174033-1cd082e322ad github.com/dnaeon/go-vcr v1.0.1 github.com/hashicorp/go-cleanhttp v0.5.2 diff --git a/go.sum b/go.sum index e9cb40f75f..d842b5b9aa 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/datadog-api-client-go/v2 v2.3.2-0.20221013130632-7ce5b4f69ecd h1:dQYHabZBaVwABfGEs0brELsctqjKpfhwnWIDHb6jETg= -github.com/DataDog/datadog-api-client-go/v2 v2.3.2-0.20221013130632-7ce5b4f69ecd/go.mod h1:98b/MtTwSAr/yhTfhCR1oxAqQ/4tMkdrgKH7fYiDA0g= +github.com/DataDog/datadog-api-client-go/v2 v2.3.2-0.20221021143944-ddf9f44ef204 h1:4XSc1gxiTizlIHRKOfadKCwinMsVr69hto1G2HFc9ns= +github.com/DataDog/datadog-api-client-go/v2 v2.3.2-0.20221021143944-ddf9f44ef204/go.mod h1:98b/MtTwSAr/yhTfhCR1oxAqQ/4tMkdrgKH7fYiDA0g= github.com/DataDog/datadog-go v4.4.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=