-
Notifications
You must be signed in to change notification settings - Fork 122
feat: Add elasticsearch_index_template
data source
#828
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
Conversation
1ac9dd3
to
87f2807
Compare
This commit adds a new data source `elasticsearch_index_template`.
87f2807
to
b20430e
Compare
c5499e6
to
08c8094
Compare
Hmm, I'm confused why the integration tests are failing for new ds? Unless the |
This template exists across `v7` and `v8`, so should pass the integration tests... 🤞
Right, I've switched to checking the |
@fatmcgav maybe it would make sense for the acceptance test to first create a template, and then check that the data source can retrieve it instead of relying on default templates being present. WDYT? |
Are you able to add an entry to the CHANGELOG for this one too please? |
Yeh, that probably makes for the most stable tests... Will rework this morning 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending the changelog and acc test improvements.
This commit updates teh `template_data_source_test` to create a randomly named index template and then use that index template to verify the data source.
Thanks @tobio... Tweaks pushed 👍 |
Damn, something it still doesn't like there 😢 ... I'm struggling to run the integration tests locally due to environmental issues... will keep plugging away though... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this!
@tobio Could I be cheeky and ask for a release? This ds will be useful in some work we're currently undertaking to manage all our ILM policies and index templates via Terraform... And with Kubernetes integration there's quite a few index templates that need to be copied for https://www.elastic.co/guide/en/fleet/current/data-streams-ilm-tutorial.html 👍 |
Not cheeky at all :) We'll aim to get a release out this week. I'm not a big fan of leaving community contributions sitting unreleased for ages, you're generally not doing it just for fun. |
* feat: Add `elasticsearch_index_template` data source This commit adds a new data source `elasticsearch_index_template`. * Fix lint failures * Update docs template * Switch to use the existing `logs` index template This template exists across `v7` and `v8`, so should pass the integration tests... 🤞 * Refactor acceptance test to create a new index template for testing This commit updates teh `template_data_source_test` to create a randomly named index template and then use that index template to verify the data source. * Add entry to CHANGELOG.md * Fix format * Add missing `fmt` import * Reference the template resource to setup the right dependencies --------- Co-authored-by: Toby Brain <[email protected]>
This commit adds a new data source
elasticsearch_index_template
.