-
Notifications
You must be signed in to change notification settings - Fork 9
Implement the automation framework resources #38
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
|
||
### Condition Argument Reference | ||
|
||
* `query` - Required - Dynamic Focus Query string that selects a list of entities on which the policy is run. |
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 don't think this is required.
Update: after testing, if the policy is both manual and automatic and if you want a specific DFQ then this field is required in both type_configuration objects. It is not required if the policy is manual only. It is also not required if you don't want a specific DFQ.
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.
My logic was the condition is optional, but query is required within the condition. Is it confusing? Probably I can remove the condition block and just have a condition_query attribute for Type Configuration.
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, makes sense now.
} | ||
|
||
func (ds *customEventSpecificationDataSource) findCustomEventByNameAndEntityType(name string, entityType string, data *[]*restapi.CustomEventSpecification) (*restapi.CustomEventSpecification, error) { | ||
for _, customEvent := range *data { |
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 this is fine, but just note that I was able to create two custom events with the same name and entity type.
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.
True, the builtin events data source returns just one entry as well, but it might not be correct. I can change the implementation and have a data source that returns multiple "items". What do you think?
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 it's fine for now. It's really an edge case. It can be addressed later if needed.
|
||
## Argument Reference | ||
|
||
* `name` - Required - The name of the automation action. |
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 don't know if it's needed, but you also get the acton id
.
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.
This is the resource documentation and we don't specify the id argument. Right?
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.
correct, on the resource you don't specify an ID.
Implemented the automation framework resources:
Included two new data sources to help with the automation policy resource definition: