Skip to content

Conversation

@tobio
Copy link
Member

@tobio tobio commented Oct 15, 2024

Fixes #829
Fixes #770

Updates validation to check attributes are Elastic durations, not Golang durations.

@tobio tobio self-assigned this Oct 15, 2024
adcoelho
adcoelho previously approved these changes Oct 15, 2024
Copy link
Contributor

@adcoelho adcoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but the regex in utils.StringIsElasticDuration allows a bit more than the API.

^[0-9]+(?:\.[0-9]+)?(?:d|h|m|s|ms|micros|nanos)$ vs only seconds/minutes/hours/days in the Rules API.

@tobio tobio requested a review from adcoelho October 16, 2024 08:27
@tobio tobio merged commit e694471 into main Oct 16, 2024
41 checks passed
@tobio tobio deleted the verify-elastic-durations branch October 16, 2024 23:02
kjwardy pushed a commit to kjwardy/terraform-provider-elasticstack that referenced this pull request Oct 21, 2024
…astic#846)

* Alerting fields should be Elastic durations, not Golang durations

* Changelog

* PR feedback

* Ok golangci-lint

* Update internal/kibana/alerting.go

Co-authored-by: Antonio <[email protected]>

---------

Co-authored-by: Antonio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants