Skip to content

GH-1218 | Migrate to V6 SDK and Add track_all_groups to okta_user_group_memberships - #2888

Open
dhiwakar-okta wants to merge 4 commits into
masterfrom
GH-1218
Open

GH-1218 | Migrate to V6 SDK and Add track_all_groups to okta_user_group_memberships#2888
dhiwakar-okta wants to merge 4 commits into
masterfrom
GH-1218

Conversation

@dhiwakar-okta

Copy link
Copy Markdown
Contributor
  • Migrates okta_user_group_memberships and okta_group_memberships (and their shared helpers in group.go) from the V2 SDK (sdk.Client) to the V6 SDK (v6okta.APIClient), aligning with the provider's ongoing SDK migration.

  • Implements the track_all_groups feature requested in okta_user_group_memberships - track_all_groups #1218 for okta_user_group_memberships.

  • Fixes a latent bug where removing a managed group externally caused a full resource recreate instead of a targeted update.

@github-actions
github-actions Bot requested a review from aditya-okta July 11, 2026 14:59
those groups stop being part of the user's memberships. If the desired behavior is
to track all groups that are added/removed from the user make use of the
'track_all_groups' argument with this resource.`,
Schema: map[string]*schema.Schema{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you missed adding the attribute to the resource's schema, though resourceUserGroupMembershipsRead() reads it. d.Get on an undeclared key returns nil, so the .(bool) assertion panics on every read.

Suggested change
Schema: map[string]*schema.Schema{
Schema: map[string]*schema.Schema{
"track_all_groups": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "The resource concerns itself with all groups added/deleted to the user; even those managed outside of the resource.",
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants