Skip to content

Commit

Permalink
default type json
Browse files Browse the repository at this point in the history
  • Loading branch information
mirii1994 committed May 28, 2023
1 parent f340aa0 commit 532d79b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/cycodehq-public/cycode-cli
rev: 0.1.6
hooks:
- id: cycode
language_version: python3
stages:
- commit
2 changes: 1 addition & 1 deletion docs/resources/alert_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "logzio_alert_v2" "my_alert" {
* `notification_emails` - (String list) Array of email addresses to be notified when the alert triggers.
* `alert_notification_endpoints` - (Integer list) Array of IDs of pre-configured endpoint channels to notify when the alert triggers.
* `suppress_notifications_minutes` - (Integer) Defaults to 5. Add a waiting period in minutes to space out notifications. (The alert will still trigger but will not send out notifications during the waiting period.)
* `output_type` - (String) Selects the output format for the alert notification. Can be: `"JSON"` or `"TABLE""` If the alert has no aggregations/group by fields, JSON offers the option to send full sample logs without selecting specific fields.
* `output_type` - (String) Selects the output format for the alert notification. Can be: `"JSON"` or `"TABLE""` If the alert has no aggregations/group by fields, JSON offers the option to send full sample logs without selecting specific fields. Defaults to `JSON`.
* `correlation_operator` - (String) Comma separated string of supported operators. Only applicable when multiple sub-components are in use. Selects a logic for correlating the alert’s sub-components. `AND` is currently the only supported operator. When AND is the correlation_operator, both sub-components must meet their triggering criteria for the alert to trigger.
* `joins` - (Map list) Specifies which group by fields must have the same values to trigger the alert. Joins the group by fields from the first and second sub-components. The key represents the index of the sub component in the array. The fields must be ordered pairs of the group by fields already in use in the `sub_components.query_string`.
* `schedule_cron_expression` - (String) Cron job for the intervals schedule.
Expand Down
1 change: 1 addition & 0 deletions logzio/resource_alert_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func resourceAlertV2() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ValidateFunc: utils.ValidateOutputType,
Default: alerts_v2.OutputTypeJson,
},
alertV2SubComponents: {
Type: schema.TypeList,
Expand Down
9 changes: 6 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,20 @@ terraform import logzio_subaccount.my_subaccount <SUBACCOUNT-ID>

### Changelog

- **v1.13.2**:
- **alerts v2**:
- **Bug fix**: Add default value of `JSON` to `output_type` to match API behaviour.
- **v1.13.1**:
- **s3 fetcher**:
- **Bug fix**: `prefix` field now being applied.
- **v1.13.0**:
- Upgrade `logzio_client_terraform` to `1.16.0`.
- Support [Grafana Dashboards API](https://docs.logz.io/api/#operation/createDashboard).


<details>
<summary markdown="span"> Expand to check old versions </summary>

- **v1.13.0**:
- Upgrade `logzio_client_terraform` to `1.16.0`.
- Support [Grafana Dashboards API](https://docs.logz.io/api/#operation/createDashboard).
- **v1.12.0**:
- Upgrade `logzio_client_terraform` to `1.15.0`.
- Support [S3 Fetcher API](https://docs.logz.io/api/#tag/Connect-to-S3-Buckets).
Expand Down

0 comments on commit 532d79b

Please sign in to comment.