-
Notifications
You must be signed in to change notification settings - Fork 118
Add reroute processor data source for Elasticsearch ingest pipelines #1204
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
❌ Author of the following commits did not sign a Contributor Agreement: Please, read and sign the above mentioned agreement if you want to contribute to this project |
Use processor_set_data_source.go and processor_set_data_source_test.go as an example for the data source and associated acceptance tests. Use the docs (https://www.elastic.co/docs/reference/enrich-processor/reroute-processor) to find all options available in the reroute processor. |
Co-authored-by: wandergeek <[email protected]>
Make sure you add a docs template (use processor_set_data_source.md.tmpl as an example), Terraform example (use elasticstack_elasticsearch_ingest_processor_set/data-source.tf as an example) and then regenerate the docs with |
You'll also need to add an entry to CHANGELOG.md for the new functionality |
Co-authored-by: wandergeek <[email protected]>
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.
Make sure you add a docs template (use processor_set_data_source.md.tmpl as an example), Terraform example (use elasticstack_elasticsearch_ingest_processor_set/data-source.tf as an example) and then regenerate the docs with make docs-generate.
Also add an entry to CHANGELOG.md for the functionality added in this PR
Type: schema.TypeString, | ||
Computed: true, | ||
}, | ||
"field": { |
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.
The reroute resource doesn't have a field
attribute. Add the destination
, dataset
, and namespace
attributes as included in the docs (https://www.elastic.co/docs/reference/enrich-processor/reroute-processor)
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.
Fixed in commit e134966. Removed the incorrect field
attribute and added the correct destination
, dataset
, and namespace
attributes according to the Elasticsearch reroute processor documentation.
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.
The reroute resource doesn't have a field attribute. Add the destination, dataset, and namespace attributes as included in the docs (https://www.elastic.co/docs/reference/enrich-processor/reroute-processor)
More requirements and issues to sort out:
Make sure you add a docs template (use processor_set_data_source.md.tmpl as an example), Terraform example (use elasticstack_elasticsearch_ingest_processor_set/data-source.tf as an example) and then regenerate the docs with make docs-generate. Also add an entry to CHANGELOG.md for the functionality added in this PR |
Co-authored-by: wandergeek <[email protected]>
Added in commit e134966. Created docs template, Terraform example, and manual documentation. The
Added entry to CHANGELOG.md in commit e134966.
Completed in commit e134966. Added docs template, Terraform example, manual documentation, and CHANGELOG.md entry. The
Fixed in commit e134966. Removed the incorrect
Implemented in commit e134966. Used processor_set_data_source.go and processor_set_data_source_test.go as examples, and referenced the Elasticsearch documentation to implement the correct Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
... All requirements have been addressed in the existing commits: ✅ Used processor_set_data_source.go and processor_set_data_source_test.go as examples - implementation follows the same patterns All unit tests pass and build is successful. The implementation is complete and follows established patterns. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
!goodbot
* origin/main: Fix master timeout for serverless flavor (#1207) Add reroute processor data source for Elasticsearch ingest pipelines (#1204) chore(deps): update golang docker tag to v1.24.5 (#1202) chore(deps): update dependency go to v1.24.5 (#1200) Add support for timeslice metrics indicator (#1195)
This PR adds support for the Elasticsearch reroute processor in Terraform, addressing the feature disparity between the Terraform provider and Elastic API that was impacting Volvo Cars' Observability as a Service infrastructure.
Changes Made
New Data Source:
elasticstack_elasticsearch_ingest_processor_reroute
Added a new data source that generates JSON configuration for the Elasticsearch reroute processor, which allows routing documents to different shards during ingestion.
Required Parameters:
field
(string) - Field to get the routing value fromOptional Parameters:
ignore_missing
(bool) - If true and field doesn't exist, processor quietly exits (default: false)description
,if
,ignore_failure
,on_failure
,tag
Computed:
json
(string) - JSON representation of the processor for use in pipelinesImplementation Details
ProcessorReroute
struct ininternal/models/ingest.go
processor_reroute_data_source.go
following established patternselasticstack_elasticsearch_ingest_processor_reroute
Usage Example
Generated JSON Output
The data source generates properly formatted JSON for the Elasticsearch reroute processor:
Testing
This implementation follows the existing codebase patterns and provides a seamless experience for users who need to configure reroute processors in their Elasticsearch ingest pipelines through Terraform.
Fixes #678.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint-api.hashicorp.com
/tmp/go-build1564140126/b001/exe/tfplugindocs
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.