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

[Bug]: Team with >100 members mismanaged #2871

Open
2 tasks done
spencer-langley opened this issue Dec 10, 2024 · 5 comments
Open
2 tasks done

[Bug]: Team with >100 members mismanaged #2871

spencer-langley opened this issue Dec 10, 2024 · 5 comments
Labels
not_stale Not stale issue or PR

Comments

@spencer-langley
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Provider Version

v1.21.4

Terraform Version

v1.9.8

Terraform Edition

Terraform Open Source (OSS)

Current Behavior

When a team resource block is declared with more than 100 members it is initially created successfully, however on the next plan the provider refreshes and only retrieves 100 members from the API. It then plans to add the missing members which results in an error from API because the members are already present in the team.

Seems to be a pagination issue on membership state of the team.

Worked around the issue by truncating membership to 100.

Terraform configuration to reproduce the issue

resource "mongodbatlas_team" "all_engineers" {
  org_id    = var.atlas_org_id
  name      = "all-engineers"
  usernames = local.set_of_valid_user_emails #populate this with >100
}

Steps To Reproduce

Populate list of more than 100 valid user emails
Use the above configuration to create a team with all of those users
Repeat plan and apply, see error attempting to add users that are already in the team

Logs

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Copy link
Contributor

Thanks for opening this issue! Please make sure you've followed our guidelines when opening the issue. In short, to help us reproduce the issue we need:

  • Terraform configuration file used to reproduce the issue
  • Terraform log files from the run where the issue occurred
  • Terraform Atlas provider version used to reproduce the issue
  • Terraform version used to reproduce the issue
  • Confirmation if Terraform OSS, Terraform Cloud, or Terraform Enterprise deployment

The ticket CLOUDP-289122 was created for internal tracking.

Copy link
Contributor

This issue has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale label Dec 16, 2024
@spencer-langley
Copy link
Author

bump

@maastha
Copy link
Collaborator

maastha commented Dec 24, 2024

Hi @spencer-langley
Thanks a lot for creating this issue.

We believe there is an issue with the pagination logic when users in the team are retrieved. We are working on a fix for this in #2919 .

@spencer-langley
Copy link
Author

I see this was merged, but consuming the latest provider didn't fix. Is release still pending?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not_stale Not stale issue or PR
Projects
None yet
Development

No branches or pull requests

3 participants