Skip to content

[Feature] Datastream lifecycle #838

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

Closed
aizerin opened this issue Oct 10, 2024 · 1 comment · Fixed by #852
Closed

[Feature] Datastream lifecycle #838

aizerin opened this issue Oct 10, 2024 · 1 comment · Fixed by #852
Labels
enhancement New feature or request

Comments

@aizerin
Copy link
Contributor

aizerin commented Oct 10, 2024

In my previous PR #724, I added support for the DS template lifecycle. However, this is insufficient to update the existing DS lifecycle.

https://www.elastic.co/guide/en/elasticsearch/reference/current/tutorial-manage-existing-data-stream.html

I can implement new resources for these APIs

https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-lifecycle.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-delete-lifecycle.html

usage would be:

resource "elasticstack_elasticsearch_data_stream_lifecycle" "ds_lifecycle" {
  name = "ds-name"
  data_retention = "5d"
  enabled = true
  downsampling=[...]
}

Is it OK for you to do it this way?

@aizerin aizerin added the enhancement New feature or request label Oct 10, 2024
@tobio
Copy link
Member

tobio commented Oct 14, 2024

Sounds perfect @aizerin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants