fix: [PL-63285]: Usergroup v2 update #1254
Merged
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.
Title: [Component/Feature] Short Description of the Change
Summary:
Provide a brief overview of what the PR does and why it is needed.
Details:
Explain the changes in detail, including any relevant context or background information.
Related Issues:
Reference any related issues or tickets
Testing Instructions:
Describe how the changes were tested. Include any test cases or steps to verify the functionality.
Please include the below test scenario with your changes.
#Testing
Imported resource with user_emails
Terrafrom plan mentions 0 changes

Without any user_email or users field
State file shows only user_emails and users is null which is expected
With users field
Terraform import doesn't have access to user_emails field or users field while importing hence it will always import using users_email.
In case userGroupV2 API is not present in customers environment then we fallback to V1 API behaviour
Terraform plan
For already created resources, we only see the diff based on the fields which have been provided.

During plan we have the information of whether user_email or users is present
Screenshots:
Include before and after screenshots to visually demonstrate the changes.
Checklist:
PR Check triggers
trigger build
trigger subcategoryfieldcheck
trigger gitleaks