Is your feature request related to a problem?
When creating or editing a role in opensearch, the first group of options that display are permission groups. Permission groups on the UI are action_groups in the OpenSearch backend and are separated into "index" and "cluster" type groups. When selecting from the options in the dropdown, the user is presented with all permission groups even if they are not pertinent to the current input.

On the Permissions page it shows a column for each action group to label it either an index or cluster permission.

What solution would you like?
Ideally only permission groups for the dropdown are rendered. When typing in a permission, only permissions and permission groups applicable to the corresponding input should be selectable.