Skip to content

Commit

Permalink
[datadog_security_monitoring_rule] Deprecate metric field of Security…
Browse files Browse the repository at this point in the history
… Monitoring Rules
  • Loading branch information
clementgbcn committed Oct 24, 2022
1 parent 0e42677 commit 323d910
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions datadog/resource_datadog_security_monitoring_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/security_monitoring_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<a id="nestedblock--query--agent_rule"></a>
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand Down

0 comments on commit 323d910

Please sign in to comment.