Skip to content
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

Closed

Conversation

dangoslen
Copy link
Contributor

This PR adds the ability to filter by a type in the okta_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.

@noinarisak noinarisak added enhancement Asking for new behavior or feature needs-investigation Needs further investigation labels Aug 31, 2020
@tgoodsell-tempus
Copy link
Contributor

@noinarisak Any chance we could get this an expedited review? I've found that being able to set the type parameter on group api queries is a lot more important once you start having a ton of group push provisioning being done (since they'll create groups of the same name based on what's in your application).

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",
},
Copy link
Contributor

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}
}
Copy link
Contributor

@bogdanprodan-okta bogdanprodan-okta Nov 11, 2020

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)
	}

@dangoslen dangoslen closed this Nov 12, 2020
@dangoslen
Copy link
Contributor Author

Sorry - I royally screwed up the merge from master down. Will open a new PR if that is ok with you @bogdanprodan-okta

@bogdanprodan-okta
Copy link
Contributor

Sure, go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Asking for new behavior or feature needs-investigation Needs further investigation size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants