Skip to content

Commit d17c92f

Browse files
authored
update terraform client version
1 parent c053f4b commit d17c92f

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
88
github.com/hashicorp/terraform-plugin-log v0.8.0
99
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
10-
github.com/logzio/logzio_terraform_client v1.20.0
10+
github.com/logzio/logzio_terraform_client v1.20.1
1111
github.com/stoewer/go-strcase v1.3.0
1212
github.com/stretchr/testify v1.8.1
1313
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
138138
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
139139
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
140140
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
141-
github.com/logzio/logzio_terraform_client v1.20.0 h1:0eynfD4nDB5H7pNwsodWeff6fh4Ccd7Cj8DGaWwRnyU=
142-
github.com/logzio/logzio_terraform_client v1.20.0/go.mod h1:hEQixCq9RPpvyzWerxIWKf0SYgangyWpPeogN7nytC0=
141+
github.com/logzio/logzio_terraform_client v1.20.1 h1:ZSrYwKqYavvPNUfjV4R1Ld+Aa13dmCaxhL6bsiUN7TY=
142+
github.com/logzio/logzio_terraform_client v1.20.1/go.mod h1:hEQixCq9RPpvyzWerxIWKf0SYgangyWpPeogN7nytC0=
143143
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
144144
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
145145
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=

logzio/resource_grafana_alert_rule_test.go

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
66
"github.com/logzio/logzio_terraform_provider/logzio/utils"
77
"os"
8+
"regexp"
89
"testing"
910
)
1011

@@ -86,6 +87,11 @@ func TestAccLogzioGrafanaAlertRule_CreateUpdateAlertRule(t *testing.T) {
8687
resource.TestCheckResourceAttr(resourceFullName, grafanaAlertRuleFor, "4m30s"),
8788
),
8889
},
90+
{
91+
// Update invalid name
92+
Config: getGrafanaAlertRuleConfigInvalidTitle(folderUid),
93+
ExpectError: regexp.MustCompile("alert Title cannot contain '/' or '\\\\\\\\' charchters"),
94+
},
8995
},
9096
})
9197
}
@@ -235,3 +241,40 @@ resource "logzio_grafana_alert_rule" "test_grafana_alert" {
235241
}
236242
`, folderUid)
237243
}
244+
245+
func getGrafanaAlertRuleConfigInvalidTitle(folderUid string) string {
246+
return fmt.Sprintf(`
247+
resource "logzio_grafana_alert_rule" "test_grafana_alert" {
248+
annotations = {
249+
"foo" = "bar"
250+
"hello" = "world"
251+
}
252+
condition = "A"
253+
data {
254+
ref_id = "B"
255+
datasource_uid = "AB1C234567D89012E"
256+
query_type = ""
257+
model = jsonencode({
258+
hide = false
259+
intervalMs = 2000
260+
refId = "B"
261+
})
262+
relative_time_range {
263+
from = 700
264+
to = 0
265+
}
266+
}
267+
labels = {
268+
"hey" = "oh"
269+
"lets" = "go"
270+
}
271+
is_paused = false
272+
exec_err_state = "Alerting"
273+
folder_uid = "%s"
274+
for = "4m30s"
275+
no_data_state = "OK"
276+
rule_group = "rule_group_1"
277+
title = "invalid/title"
278+
}
279+
`, folderUid)
280+
}

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ terraform import logzio_subaccount.my_subaccount <SUBACCOUNT-ID>
199199

200200
### Changelog
201201

202+
- **v1.14.1**:
203+
- Upgrade `logzio_client_terraform to 1.20.1`.
202204
- **v1.14.0**:
203205
- Upgrade `logzio_client_terraform to 1.20.0`.
204206
- Support Grafana folders.

0 commit comments

Comments
 (0)