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
Open
GH-1218 | Migrate to V6 SDK and Add track_all_groups to okta_user_group_memberships#2888dhiwakar-okta wants to merge 4 commits into
dhiwakar-okta wants to merge 4 commits into
Conversation
…o okta_user_group_memberships (#1218)
exitcode0
reviewed
Jul 31, 2026
| 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{ |
Contributor
There was a problem hiding this comment.
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.", | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates
okta_user_group_membershipsandokta_group_memberships(and their shared helpers ingroup.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_groupsfeature requested in okta_user_group_memberships - track_all_groups #1218 forokta_user_group_memberships.Fixes a latent bug where removing a managed group externally caused a full resource recreate instead of a targeted update.