Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relying on atlas api for unit validation on alert configuration #862

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions mongodbatlas/resource_mongodbatlas_alert_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,23 +126,6 @@ func resourceMongoDBAtlasAlertConfiguration() *schema.Resource {
"units": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
"RAW",
"BITS",
"BYTES",
"KILOBITS",
"KILOBYTES",
"MEGABITS",
"MEGABYTES",
"GIGABITS",
"GIGABYTES",
"TERABYTES",
"PETABYTES",
"MILLISECONDS",
"SECONDS",
"MINUTES",
"HOURS",
"DAYS"}, false),
},
"mode": {
Type: schema.TypeString,
Expand Down
37 changes: 2 additions & 35 deletions website/docs/d/alert_configuration.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,7 @@ The threshold that causes an alert to be triggered. Required if `event_type_name

* `threshold` - Threshold value outside of which an alert will be triggered.
* `units` - The units for the threshold value. Depends on the type of metric.
Accepted values are:
- `RAW`
- `BITS`
- `BYTES`
- `KILOBITS`
- `KILOBYTES`
- `MEGABITS`
- `MEGABYTES`
- `GIGABITS`
- `GIGABYTES`
- `TERABYTES`
- `PETABYTES`
- `MILLISECONDS`
- `SECONDS`
- `MINUTES`
- `HOURS`
- `DAYS`

Refer to the [MongoDB API Alert Configuration documentation](https://www.mongodb.com/docs/atlas/reference/api/alert-configurations-get-config/#request-body-parameters) for a list of accepted values.
* `mode` - This must be set to AVERAGE. Atlas computes the current metric value as an average.

### Threshold Config (`threshold_config`)
Expand All @@ -183,23 +166,7 @@ The threshold that causes an alert to be triggered. Required if `event_type_name

* `threshold` - Threshold value outside of which an alert will be triggered.
* `units` - The units for the threshold value. Depends on the type of metric.
Accepted values are:
- `RAW`
- `BITS`
- `BYTES`
- `KILOBITS`
- `KILOBYTES`
- `MEGABITS`
- `MEGABYTES`
- `GIGABITS`
- `GIGABYTES`
- `TERABYTES`
- `PETABYTES`
- `MILLISECONDS`
- `SECONDS`
- `MINUTES`
- `HOURS`
- `DAYS`
Refer to the [MongoDB API Alert Configuration documentation](https://www.mongodb.com/docs/atlas/reference/api/alert-configurations-get-config/#request-body-parameters) for a list of accepted values.

### Notifications
Notifications to send when an alert condition is detected.
Expand Down
36 changes: 2 additions & 34 deletions website/docs/r/alert_configuration.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -178,23 +178,7 @@ The threshold that causes an alert to be triggered. Required if `event_type_name

* `threshold` - Threshold value outside of which an alert will be triggered.
* `units` - The units for the threshold value. Depends on the type of metric.
Accepted values are:
- `RAW`
- `BITS`
- `BYTES`
- `KILOBITS`
- `KILOBYTES`
- `MEGABITS`
- `MEGABYTES`
- `GIGABITS`
- `GIGABYTES`
- `TERABYTES`
- `PETABYTES`
- `MILLISECONDS`
- `SECONDS`
- `MINUTES`
- `HOURS`
- `DAYS`
Refer to the [MongoDB API Alert Configuration documentation](https://www.mongodb.com/docs/atlas/reference/api/alert-configurations-get-config/#request-body-parameters) for a list of accepted values.

* `mode` - This must be set to AVERAGE. Atlas computes the current metric value as an average.

Expand All @@ -206,23 +190,7 @@ The threshold that causes an alert to be triggered. Required if `event_type_name

* `threshold` - Threshold value outside of which an alert will be triggered.
* `units` - The units for the threshold value. Depends on the type of metric.
Accepted values are:
- `RAW`
- `BITS`
- `BYTES`
- `KILOBITS`
- `KILOBYTES`
- `MEGABITS`
- `MEGABYTES`
- `GIGABITS`
- `GIGABYTES`
- `TERABYTES`
- `PETABYTES`
- `MILLISECONDS`
- `SECONDS`
- `MINUTES`
- `HOURS`
- `DAYS`
Refer to the [MongoDB API Alert Configuration documentation](https://www.mongodb.com/docs/atlas/reference/api/alert-configurations-get-config/#request-body-parameters) for a list of accepted values.

### Notifications
List of notifications to send when an alert condition is detected.
Expand Down