Skip to content

Commit c6fd0a4

Browse files
authored
[Release] upgrade to grafana 10 (#196)
1 parent 9293480 commit c6fd0a4

24 files changed

+545
-465
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v5
1818
with:
19-
go-version: 1.18
19+
go-version: 1.24
2020
- name: Import GPG key
2121
id: import_gpg
2222
uses: paultyng/ghaction-import-gpg@v2.1.0

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ env:
2424
jobs:
2525
test:
2626
name: Test
27-
runs-on: ubuntu-20.04
27+
runs-on: ubuntu-24.04
2828
steps:
2929
- uses: actions/checkout@v4
3030

3131
- name: Set up Go
3232
uses: actions/setup-go@v5
3333
with:
34-
go-version: 1.22
34+
go-version: 1.24
3535
- name: Test
3636
working-directory: logzio
3737
run: |

CHANGELOG.md

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# Changes by Version
2+
3+
<!-- next version -->
4+
5+
## v1.17.0
6+
- Upgrade `logzio_client_terraform` to `1.23.2`.
7+
- Upgrade Grafana API to match Grafana 10.
8+
- **Breaking changes:**
9+
- Grafana Alerts API `exec_err_state` field is no longer configurable, always defaults to `OK`.
10+
- Grafana Contact Point `teams` now refers to Microsoft Teams Workflows Contact Point. The old `teams` endpoint was deprecated.
11+
- Default notification policy contact point changed from `default-email` to `grafana-default-email`
12+
- Webhook Contact Point now supports `authorization_credentials`
13+
- Upgrade to Go 1.24.
14+
15+
## v1.16.0
16+
- Upgrade `logzio_client_terraform` to `1.22.0`.
17+
- Validate account existence before updating and set an empty account name If the name did not change to prevent API errors
18+
19+
## v1.15.0
20+
- Upgrade `logzio_client_terraform` to `1.21.0`.
21+
- Support [Metrics Accounts API](https://api-docs.logz.io/docs/logz/create-a-new-metrics-account)
22+
23+
## v1.14.1
24+
- Upgrade `logzio_client_terraform` to `1.20.1`.
25+
26+
## v1.14.0
27+
- Upgrade `logzio_client_terraform` to `1.20.0`.
28+
- Support Grafana folders.
29+
- Support [Grafana Alert Rules](https://api-docs.logz.io/docs/logz/get-alert-rules).
30+
- Support [Grafana Contact Point](https://api-docs.logz.io/docs/logz/route-get-contactpoints).
31+
- Grafana Notification Policy.
32+
33+
## v1.13.2
34+
- **alerts v2**:
35+
- **Bug fix**: Add default value of `JSON` to `output_type` to match API behaviour.
36+
- **grafana dashboards**:
37+
- **Bug fix**: Handle dashboard configs with id and version fields.
38+
39+
## v1.13.1
40+
- **s3 fetcher**:
41+
- **Bug fix**: `prefix` field now being applied.
42+
43+
## v1.13.0
44+
- Upgrade `logzio_client_terraform` to `1.16.0`.
45+
- Support [Grafana Dashboards API](https://api-docs.logz.io/docs/logz/get-datasource-by-account).
46+
47+
## v1.12.0
48+
- Upgrade `logzio_client_terraform` to `1.15.0`.
49+
- Support [S3 Fetcher API](https://api-docs.logz.io/docs/logz/create-buckets).
50+
51+
## v1.11.0
52+
- Upgrade `terraform-plugin-sdk` to `v2.24.1`.
53+
- Upgrade `logzio_client_terraform` to `1.14.0`.
54+
- `alert_v2` - support alert scheduling.
55+
56+
## v1.10.2
57+
- Upgrade to logzio_client_terraform 1.13.1.
58+
- Remove retries resources, as the new client handles it. Retries on update that validate update are still active.
59+
60+
## v1.10.1
61+
- Upgrade to logzio_client_terraform 1.13.0.
62+
- Bug fix for **subaccount** - field `reserved_daily_gb` can be 0.
63+
64+
## v1.10.0
65+
- **Breaking Changes**:
66+
- Upgrading `terraform-plugin-sdk` to `v2.21.0`:
67+
- **Terraform 0.11** and lower will not be supported.
68+
- To read more about migrating to v2 of the `terraform-plugin-sdk` see [this article](https://www.terraform.io/plugin/sdkv2/guides/v2-upgrade-guide).
69+
- Removal of the `logzio_alert` resource. Use `logzio_alert_v2` instead.
70+
- `logzio_user`:
71+
- Update resource `logzio_user` to match current API and repo code conventions
72+
- Removal of `roles` field. Use field `role` instead.
73+
- `logzio_archive_logs`:
74+
- Removal of `s3_secret_credentials`. Use `aws_access_key` and `aws_secret_key` instead. See documentation for current configuration structure.
75+
- Removal of `archiveLogsAzureBlobStorageSettings`, `archiveLogsAmazonS3StorageSettings`. Fields under these attributes are not nested anymore. See docs & examples for reference.
76+
- Renaming fields.
77+
- Refactor code to match current API.
78+
- datasource - removal of secret fields. See documentation for current available fields.
79+
- `logzio_restore_logs`:
80+
- Add `username` field, to match current API.
81+
- `logzio_subaccount`:
82+
- Removal of field `utilization_settings`.
83+
- Delete resource from state on unsuccessful read operation.
84+
- Upgrade to Go 1.18.
85+
- Upgrade to logzio_client_terraform 1.12.0.
86+
87+
## v1.9.2
88+
- *Bug fix*: Fix diff for resource `alert_v2` in fields `alert_notification_endpoints`, `notification_emails` ([#116](https://github.com/logzio/terraform-provider-logzio/issues/116)).
89+
90+
## v1.9.1
91+
- *Bug fix*: plugin won't crash when import for `archive_logs` fails.
92+
93+
## v1.9.0
94+
- Update client version(v1.11.0).
95+
- Support [Kibana objects](https://api-docs.logz.io/docs/logz/import-or-export-kibana-objects)
96+
97+
## v1.8.3
98+
- Update client version(v1.10.3).
99+
- Bug fixes:
100+
- **alerts_v2**:
101+
- Fix noisy diff for tags.
102+
- Field `is_enabled` defaults to `true`.
103+
- **sub_accounts**: allow creating flexible account without `max_daily_gb`.
104+
105+
## v1.8.2
106+
- Update client version(v1.10.2).
107+
- Bug fixes:
108+
- **alerts_v2**: fix bug for columns requiring sort field.
109+
- **sub_accounts**: add backoff for creating and updating sub accounts.
110+
111+
## v1.8.1
112+
- Upgrade provider's Go version from 1.15 to 1.16 in code and in release workflow.
113+
- Improve tests - add sleep after each test.
114+
115+
## v1.8.0
116+
- **Breaking change**: **custom endpoint** - refactor Headers - now a string of comma-seperated key-value pairs.
117+
- Update client version (v1.10.1) - bug fix for empty Header field.
118+
- Add to custom endpoint datasource Description field.
119+
120+
## v1.7.0
121+
- Update client version (v1.10).
122+
- Support [authentication groups resource](https://api-docs.logz.io/docs/logz/authentication-groups).
123+
- `alerts_v2`: fix noisy diff for `severity_threshold_tiers`.
124+
125+
126+
## v1.6.1
127+
- Update client version (v1.9.1) - bug fix for not found messages.
128+
129+
## v1.6
130+
- Update client version (v1.9).
131+
- Support [archive logs resource](https://api-docs.logz.io/docs/logz/archive-logs).
132+
- Support [restore logs resource](https://api-docs.logz.io/docs/logz/restore-logs).
133+
134+
## v1.5
135+
- Update client version(v1.8).
136+
- `sub_account`:
137+
- **Breaking changes:**
138+
- Deprecated attribute `utilization_settings`. Use `frequency_minutes` and `utilization_enabled` instead.
139+
- Added attributes `flexible` and `reserved_daily_gb`.
140+
- Refactor tests.
141+
- Refactor code to use Terraform's retry.
142+
- `endpoint`:
143+
- **Breaking changes:**
144+
- Types naming.
145+
- New endpoints for OpsGenie, ServiceNow and Microsoft Teams.
146+
- Fix bug for `body_template` for `custom` type ([#70](https://github.com/logzio/terraform-provider-logzio/issues/70)).
147+
- Refactor tests.
148+
- Refactor code to use Terraform's retry.
149+
- `alerts_v2`:
150+
- Fix bug for `filter_must`,`filter_must_not` ([#82](https://github.com/logzio/terraform-provider-logzio/issues/82))
151+
- Refactor tests.
152+
- Refactor code to use Terraform's retry.
153+
- `drop_filter`:
154+
- Improve tests.
155+
156+
## v1.4
157+
- Update client version(v1.7).
158+
- Support [Drop Filter](https://api-docs.logz.io/docs/logz/drop-filters) resource.
159+
160+
## v1.3
161+
- Update client version(v1.6).
162+
- Support Log Shipping Token resource.
163+
164+
## v1.2.4
165+
- Update client version(v1.5.3).
166+
- Fix `sub account` to return attributes `account_token` & `account_id`.
167+
168+
## v1.2.3
169+
- Fix bug for `custom endpoint` empty headers.
170+
- Allow empty sharing accounts array in `sub account`.
171+
- Add retry in resource `sub account`.
172+
- Replace module `terraform` with `terraform-plugin-sdk`. See further explanation [here](https://www.terraform.io/docs/extend/guides/v1-upgrade-guide.html).
173+
- Upgrade to Go v1.15.
174+
- Update client version(v1.5.2).
175+
176+
## v1.2.2
177+
- Update client version(v1.5.1).
178+
- Fix alerts_v2 sort bug.
179+
180+
## v1.2.1
181+
- Fix alerts_v2 type "TABLE" bug.
182+
183+
## v1.2
184+
- Update client version(v1.5.0).
185+
- Support Alerts v2 resource.
186+
- Fix 404 error for Alerts.
187+
188+
## v1.1.8
189+
- Update client version
190+
- Fix custom endpoint headers bug
191+
192+
## v1.1.7
193+
- Published to Terraform registry
194+
195+
## v1.1.5
196+
- Fix boolean parameters not parsed bug
197+
- Support import command to state
198+
199+
## v1.1.4
200+
- Support Sub Accounts resource
201+
- few bug fixes
202+
- removed circleCI
203+
204+
## v1.1.3
205+
- examples now use TF12
206+
- will now generate the meta data needed for the IntelliJ type IDE HCL plugin
207+
- no more travis - just circle CI
208+
- version bump to use the latest TF library (0.12.6), now compatible with TF12
209+
210+
## v1.1.2
211+
- Moved some of the source code around to comply with TF provider layout convention
212+
- Moved the examples into an examples directory

docs/resources/grafana_alert_rule.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ resource "logzio_grafana_alert_rule" "test_grafana_alert" {
3131
"lets" = "go"
3232
}
3333
is_paused = false
34-
exec_err_state = "Alerting"
3534
folder_uid = "my-folder-uid"
3635
for = "3m"
3736
no_data_state = "OK"
@@ -56,7 +55,6 @@ resource "logzio_grafana_alert_rule" "test_grafana_alert" {
5655
* `annotations` - (Map of String) Key-value pairs of metadata to attach to the alert rule that may add user-defined context, but cannot be used for matching, grouping, or routing.
5756
* `labels` - (Map of String) Key-value pairs to attach to the alert rule that can be used in matching, grouping, and routing.
5857
* `is_paused` - (Boolean) Sets whether the alert should be paused or not. Defaults to `false`.
59-
* `exec_err_state` - (String) Describes what state to enter when the rule's query is invalid and the rule cannot be executed. Options are `OK`, `Error`, and `Alerting`. Defaults to `Alerting`.
6058
* `no_data_state` - (String) Describes what state to enter when the rule's query returns No Data. Options are `OK`, `NoData`, and `Alerting`. Defaults to `NoData`.
6159

6260
#### Nested schema for `data`:

docs/resources/grafana_notification_policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Deleting the resource will reset your ENTIRE notification policy tree.
1111

1212
```hcl
1313
resource logzio_grafana_notification_policy test_np {
14-
contact_point = "default-email"
14+
contact_point = "grafana-default-email"
1515
group_by = ["p8s_logz_name"]
1616
group_wait = "50s"
1717
group_interval = "7m"
@@ -23,7 +23,7 @@ resource logzio_grafana_notification_policy test_np {
2323
match = "="
2424
value = "some_value"
2525
}
26-
contact_point = "default-email"
26+
contact_point = "grafana-default-email"
2727
continue = true
2828
2929
group_wait = "50s"
@@ -37,7 +37,7 @@ resource logzio_grafana_notification_policy test_np {
3737
match = "="
3838
value = "another_value"
3939
}
40-
contact_point = "default-email"
40+
contact_point = "grafana-default-email"
4141
}
4242
}
4343
}

docs/resources/s3_fetcher.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ resource "logzio_s3_fetcher" "my_s3_fetcher_arn" {
3333

3434
* `aws_access_key` - (String) AWS S3 bucket access key. Not applicable if you choose to authenticate with `aws_arn`. If you choose to authenticate with AWS keys, both `aws_access_key` and `aws_secret key` must be set.
3535
* `aws_secret_key` - (String) AWS S3 bucket secret key. Not applicable if you choose to authenticate with `aws_arn`. If you choose to authenticate with AWS keys, both `aws_access_key` and `aws_secret key` must be set.
36-
* `aws_arn` - (String) Amazon Resource Name (ARN) to uniquely identify the S3 bucket. To generate a new ARN, create a new IAM Role in your AWS admin console. Not applicable if you choose to authenticate with AWS keys (access key & secret key).
36+
* `aws_arn` - (String) Amazon Resource Name (ARN) of the IAM Role used for authentication. To generate a new ARN, create a new IAM Role in your AWS admin console. Not applicable if you choose to authenticate with AWS keys (access key & secret key).
3737
* `bucket_name` - (String) AWS S3 bucket name.
3838
* `active` - (Boolean) If true, the S3 bucket connector is active and logs are being fetched to Logz.io. If false, the connector is disabled.
3939
* `aws_region` - (String) Bucket's region. Specify one supported AWS region: `US_EAST_1`, `US_EAST_2`, `US_WEST_1`, `US_WEST_2`, `EU_WEST_1`, `EU_WEST_2`, `EU_WEST_3`, `EU_CENTRAL_1`, `AP_NORTHEAST_1`, `AP_NORTHEAST_2`, `AP_SOUTHEAST_1`, `AP_SOUTHEAST_2`, `SA_EAST_1`, `AP_SOUTH_1`, `CA_CENTRAL_1`.

go.mod

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
11
module github.com/logzio/logzio_terraform_provider
22

3-
go 1.18
3+
go 1.24
44

55
require (
66
github.com/avast/retry-go v3.0.0+incompatible
77
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
8-
github.com/hashicorp/terraform-plugin-log v0.8.0
9-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
10-
github.com/logzio/logzio_terraform_client v1.22.0
8+
github.com/hashicorp/terraform-plugin-log v0.9.0
9+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1
10+
github.com/logzio/logzio_terraform_client v1.23.2
1111
github.com/stoewer/go-strcase v1.3.0
12-
github.com/stretchr/testify v1.8.1
12+
github.com/stretchr/testify v1.10.0
1313
)
1414

1515
require (
16+
github.com/ProtonMail/go-crypto v1.1.3 // indirect
1617
github.com/agext/levenshtein v1.2.2 // indirect
17-
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
18+
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
19+
github.com/cloudflare/circl v1.3.7 // indirect
1820
github.com/davecgh/go-spew v1.1.1 // indirect
19-
github.com/fatih/color v1.13.0 // indirect
20-
github.com/golang/protobuf v1.5.2 // indirect
21-
github.com/google/go-cmp v0.5.9 // indirect
21+
github.com/fatih/color v1.16.0 // indirect
22+
github.com/golang/protobuf v1.5.4 // indirect
23+
github.com/google/go-cmp v0.6.0 // indirect
2224
github.com/hashicorp/errwrap v1.0.0 // indirect
2325
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
2426
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
25-
github.com/hashicorp/go-hclog v1.4.0 // indirect
27+
github.com/hashicorp/go-hclog v1.6.3 // indirect
2628
github.com/hashicorp/go-multierror v1.1.1 // indirect
27-
github.com/hashicorp/go-plugin v1.4.8 // indirect
29+
github.com/hashicorp/go-plugin v1.6.2 // indirect
30+
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
2831
github.com/hashicorp/go-uuid v1.0.3 // indirect
29-
github.com/hashicorp/go-version v1.6.0 // indirect
30-
github.com/hashicorp/hc-install v0.5.0 // indirect
31-
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
32+
github.com/hashicorp/go-version v1.7.0 // indirect
33+
github.com/hashicorp/hc-install v0.9.1 // indirect
34+
github.com/hashicorp/hcl/v2 v2.23.0 // indirect
3235
github.com/hashicorp/logutils v1.0.0 // indirect
33-
github.com/hashicorp/terraform-exec v0.18.1 // indirect
34-
github.com/hashicorp/terraform-json v0.16.0 // indirect
35-
github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect
36-
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
37-
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
38-
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
39-
github.com/mattn/go-colorable v0.1.12 // indirect
40-
github.com/mattn/go-isatty v0.0.14 // indirect
36+
github.com/hashicorp/terraform-exec v0.22.0 // indirect
37+
github.com/hashicorp/terraform-json v0.24.0 // indirect
38+
github.com/hashicorp/terraform-plugin-go v0.26.0 // indirect
39+
github.com/hashicorp/terraform-registry-address v0.2.4 // indirect
40+
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
41+
github.com/hashicorp/yamux v0.1.1 // indirect
42+
github.com/mattn/go-colorable v0.1.13 // indirect
43+
github.com/mattn/go-isatty v0.0.20 // indirect
4144
github.com/mitchellh/copystructure v1.2.0 // indirect
4245
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
4346
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
@@ -46,17 +49,19 @@ require (
4649
github.com/oklog/run v1.0.0 // indirect
4750
github.com/pmezard/go-difflib v1.0.0 // indirect
4851
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
49-
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
50-
github.com/vmihailenco/tagparser v0.1.1 // indirect
51-
github.com/zclconf/go-cty v1.13.1 // indirect
52-
golang.org/x/crypto v0.14.0 // indirect
53-
golang.org/x/mod v0.8.0 // indirect
54-
golang.org/x/net v0.17.0 // indirect
55-
golang.org/x/sys v0.13.0 // indirect
56-
golang.org/x/text v0.13.0 // indirect
57-
google.golang.org/appengine v1.6.6 // indirect
52+
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
53+
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
54+
github.com/zclconf/go-cty v1.16.2 // indirect
55+
golang.org/x/crypto v0.33.0 // indirect
56+
golang.org/x/mod v0.22.0 // indirect
57+
golang.org/x/net v0.34.0 // indirect
58+
golang.org/x/sync v0.11.0 // indirect
59+
golang.org/x/sys v0.30.0 // indirect
60+
golang.org/x/text v0.22.0 // indirect
61+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
62+
google.golang.org/appengine v1.6.8 // indirect
5863
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d // indirect
59-
google.golang.org/grpc v1.51.0 // indirect
60-
google.golang.org/protobuf v1.28.1 // indirect
64+
google.golang.org/grpc v1.69.4 // indirect
65+
google.golang.org/protobuf v1.36.3 // indirect
6166
gopkg.in/yaml.v3 v3.0.1 // indirect
6267
)

0 commit comments

Comments
 (0)