-
Notifications
You must be signed in to change notification settings - Fork 207
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
Adding type to data okta group #155
Conversation
@noinarisak Any chance we could get this an expedited review? I've found that being able to set the |
Optional: true, | ||
Default: false, | ||
Description: "Type of the group. When specified in the terraform resource, will act as a filter when searching for the group", | ||
}, |
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.
Could you please add a validation function for group types?
https://developer.okta.com/docs/reference/api/groups/#group-type
if d.Get("type") != nil { | ||
groupType := d.Get("type").(string) | ||
searchParams = &query.Params{Q: name, Type: groupType} | ||
} |
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 can be simplified
if d.Get("type") != nil {
searchParams.Type = d.Get("type").(string)
}
Sorry - I royally screwed up the merge from master down. Will open a new PR if that is ok with you @bogdanprodan-okta |
Sure, go ahead! |
This PR adds the ability to filter by a
type
in theokta_group
data entity.This is useful in cases were Okta is managed groups from multiple sources (LDAP, Google groups, etc.) that have the same name but different types.
It additionally returns the type as an attribute of the entity.