-
Notifications
You must be signed in to change notification settings - Fork 445
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
[Elastic Connectors] Add index name as input var #11267
[Elastic Connectors] Add index name as input var #11267
Conversation
@@ -37,11 +37,19 @@ policy_templates: | |||
enabled: false | |||
agentless: | |||
enabled: true | |||
multiple: false |
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.
Revert to default multiple: true
given that now we can have multiple policies with the same input (each input corresponds to a single connector)
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.
Double checking - this would let you set up two github connectors at once? Or this shows you both github and gdrive at once? I'm hoping NOT the later.
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.
Actually we might want to keep multiple: false
it prevents adding multiple integrations of type elastic connectors to the same policy. I think this is what we want.
Or this shows you both github and gdrive at once?
This doesn't affect this, if you click google drive tile it will just show you "Google Drive Connector" integration. If you click "elastic connectors" (parent package) you will see bothgdrive and github... at some point we need to figure this out. I know it's possible to add custom UI for that parent integration with some level of effort.
The good thing is that the component logic will detect if multiple inputs were passed to the component (e..g when enabling multiple inputs in parent integration tile UI), will log a warning and just accept a single input unit.
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.
Added multiple: false back in c635362
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.
👍 sounds good
if you click "elastic connectors" (parent package) you will see bothgdrive and github... at some point we need to figure this out.
Proposal to remove that parent tile is being tracked in elastic/package-spec#802
required: true | ||
show_user: false | ||
description: Connector name to identify the connector in the UI | ||
default: "[Elastic-managed] Github Connector" |
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.
Can we add an auto-increment number in here, like we get in the policy and integration name defaults? That might help avoid collisions.
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.
Unfortunately not, we don't have much control over the logic here. Perhaps we could leave this blank and have a custom naming logic (with autoincrement or short randomised string) in connectors python upon creation
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.
See, the approach I mentioned in the component PR elastic/connectors#2861 (comment)
I think it would be better to mark this field as optional, don't default to anything and have custom logic to generate the name in connector component. This makes this process independent on fleet logic :) for now I'm appending short id to make connectors unique in frontend, see:
I'm applying changes to the package def
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.
I think that makes sense, to control this in the backend for now. CC @kpollich, in case the idea of auto-increment vars is something worth us filing an issue for, somewhere.
@@ -37,11 +37,19 @@ policy_templates: | |||
enabled: false | |||
agentless: | |||
enabled: true | |||
multiple: false |
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.
Double checking - this would let you set up two github connectors at once? Or this shows you both github and gdrive at once? I'm hoping NOT the later.
Quality Gate passedIssues Measures |
💚 Build Succeeded
History
|
Package elastic_connectors - 0.0.2 containing this change is available at https://epr.elastic.co/search?package=elastic_connectors |
Add connector_name as input variable
Update connector package definition to pass
connector_name
as input variable for the package logic.Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Screenshots