Skip to content

Commit

Permalink
[Elastic Connectors] Add index name as input var (elastic#11267)
Browse files Browse the repository at this point in the history
* [Elastic Connectors] Add index name as input var

* Pass connector name instead of index name

* reduce code duplication, update changelog

* Update changelog, change connector_name to optional var
  • Loading branch information
jedrazb authored Oct 7, 2024
1 parent 5abee2d commit 358e5c3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/elastic_connectors/agent/input/github.yml.hbs
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
service_type: github
{{#if connector_name}}
connector_name: {{connector_name}}
{{/if}}
3 changes: 3 additions & 0 deletions packages/elastic_connectors/agent/input/google_drive.yml.hbs
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
service_type: google_drive
{{#if connector_name}}
connector_name: {{connector_name}}
{{/if}}
5 changes: 5 additions & 0 deletions packages/elastic_connectors/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: 0.0.2
changes:
- description: Add connector_name as the connector input variable
type: enhancement
link: https://github.com/elastic/integrations/pull/11267
- version: 0.0.1
changes:
- description: Initial draft of the package
Expand Down
15 changes: 13 additions & 2 deletions packages/elastic_connectors/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 3.2.1
name: elastic_connectors
title: "Elastic Connectors"
version: 0.0.1
version: 0.0.2
source:
license: "Elastic-2.0"
description: "Sync data from source to the Elasticsearch index."
Expand All @@ -28,7 +28,7 @@ policy_templates:
title: GitHub & GitHub Enterprise Server Connector
icons:
- src: /img/service_type/github.svg
title: Google Drive logo
title: GitHub logo
size: 32x32
type: image/svg+xml
description: Use a connector to sync data from your GitHub data source.
Expand All @@ -42,6 +42,14 @@ policy_templates:
- type: connectors-py
title: GitHub & GitHub Enterprise Server Connector
description: Connectors syncs data from an original data source to an Elasticsearch index.
vars:
- &connector_name
name: connector_name
type: text
title: Connector Name
required: false
show_user: false # TODO: Change to true once this is fixed https://github.com/elastic/kibana/issues/194310
description: Connector name to identify the connector in the UI
template_path: github.yml.hbs
- name: google_drive
title: Google Drive Connector
Expand All @@ -61,7 +69,10 @@ policy_templates:
- type: connectors-py
title: Google Drive Connector
description: Connectors syncs data from an original data source to an Elasticsearch index.
vars:
- <<: *connector_name
template_path: google_drive.yml.hbs

owner:
github: elastic/search-extract-and-transform
type: elastic

0 comments on commit 358e5c3

Please sign in to comment.