elastic / terraform-provider-elasticstack

Terraform provider for Elastic Stack
https://registry.terraform.io/providers/elastic/elasticstack/latest/docs
Apache License 2.0
173 stars 93 forks source link

[Feature] Anomaly Detection Jobs #520

Open nicholas-r-king opened 10 months ago

nicholas-r-king commented 10 months ago

Is your feature request related to a problem? Please describe. We are an enterprise customer (20+ units) transitioning from AWS CloudWatch to Elastic (via ECK). We currently have hundreds of developers and utilize terraform (CDK) to provision and manage our alerting and dashboarding in CloudWatch. We utilize CloudWatch for both its simple functionality (threshold based alarms) and its more advanced (Anomaly Detection). More recently we can now provision simple threshold based alerts via terraform for Elastic and teams are able to do that without issue, but as we've investigated porting over our AD based alarms we keep running into fact that anomaly detection jobs themselves are NOT manageable by the elasticstack terraform provider or any other providers. This means developers cannot provision AD alarms. This is blocking us from completely transitioning from CloudWatch to Elastic.

Describe the resource you would like to have implemented. A clear and concise description of the API you want to target. The Anomaly Detection API's. https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-ad-apis.html

https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html

Describe the solution you'd like For the official terraform provider for the elasticstack to support the creation, reading, updating and deletion of Anomaly Detection jobs and allow for them to be referenced in alert rules.

Describe alternatives you've considered We've designed and tested our own bash script type solution (via null provider) that creates and deletes AD jobs. This does not scale.

holy-moly-555 commented 10 months ago

Would be great to provision ml jobs through the provider!