-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add support for the alert_delay
param in the Create Rule API
#715
Conversation
It looks like you need to add some version checks to make sure |
@tobio Thanks for your comment! I added one now to ignore the alert delay field if the version doesn't support it but I see in other places where we do version checks an error is thrown. Is ignoring the field a suitable solution? |
We should be consistent with the other resources and throw an error if |
@adcoelho, please add changelog similar to https://github.com/elastic/terraform-provider-elasticstack/pull/719/files |
We need to read |
Please disregard this (while import test can still be handy). |
Co-authored-by: Toby Brain <[email protected]>
Co-authored-by: Toby Brain <[email protected]>
* origin/main: Add support for the `alert_delay` param in the Create Rule API (#715) chore: prepare release v0.11.6 (#716) Validate that mappings are a JSON object, not just valid json (#719) fix: move all resources in one namespace for tcp monitor acc tests (#717) Bump github.com/golangci/golangci-lint from 1.59.1 to 1.60.1 in /tools (#714) Bump github.com/docker/docker in /tools (#718) Bump github.com/goreleaser/goreleaser from 1.26.1 to 1.26.2 in /tools (#642) Bump github.com/hashicorp/terraform-plugin-framework (#705) Add kibana synthetics http and tcp monitor resources (#699) Kibana spaces data source (#682) Use ephemeral github token for build. (#712) chore: 8.15.0 is here - lets try it out (#708) Update changelog for 0.11.5 Bump version for 0.11.5 (#706) Bugfix SLO API: Update type for `group_by` to accept either string or array-of-strings (#701) Support `restriction` in `elasticstack_elasticsearch_security_api_key` (#577) chore: follow-up CR changes for synthetics private location resource (#697)
related to kibana/#186963
Summary
I am updating the Terraform Provider to use the latest version of the Create Rule API.
This is the first of a few PRs in which I intend to add support for new parameters in this API.
This PR adds support for
alert_delay
.I am still testing the changes manually but updated the tests and they are all passing. I think the review can start.
What was done
I am not super familiar with this code so I'll share my steps and maybe you guys could doublecheck to see if I forgot something?
bundled.yaml
following these instructions.bundled.yaml
togenerated/alerting/bundled.yaml
make generate-alerting-client
alerting.go
etc. Not much changed in the types so I think there were no BWC issues. The only relevant thing was that some fields seem to have become optional.PS: Am I missing something in
resourceRuleRead
ininternal/kibana/alerting.go
?