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

Unable to update users #312

Open
diraven opened this issue Jul 12, 2023 · 5 comments
Open

Unable to update users #312

diraven opened this issue Jul 12, 2023 · 5 comments

Comments

@diraven
Copy link

diraven commented Jul 12, 2023

Provider seems to be using outdated endpoint method for updating users: PUT https://sentry.io/api/0/organizations/{org}/members/{member_id} (https://github.com/jianyuan/go-sentry/blob/main/sentry/organization_members.go#L101)

Which is nowhere to be seen in the official documentation: https://docs.sentry.io/api/organizations/

Sentry.io seems to have switched to using SCIM for user/team management: https://docs.sentry.io/api/scim/

I'm unsure when exactly did the switch happen, but it does not seem to be possible to update users with terraform any more: any attempt to update user through the provider leads to 400 error.

Any pointers? Am I missing something important?

@ericksprengel
Copy link

I'm receiving the an error too.

Client Error
╷
│ Error: Client Error
│ 
│   with sentry_team_member.george_banana,
│   on team_platform_interaction.tf line 19, in resource "sentry_team_member" "george_banana":
│   19: resource "sentry_team_member" "george_banana" {
│ 
│ unable to update organization member's team role, got error: PUT https://sentry.io/api/0/organizations/ericksprengel/members/11111111/: 400
│ map[role:[You do not have permission to set that org-level role] teamRoles:[Invalid team-role]]
╵

when creating an user with terraform I got an error too.

Can anyone create a sentry_team_member using terraform without errors?

@jianyuan
Copy link
Owner

Hi @ericksprengel, what team role options do you see when you visit the team members' settings page?

@Conzar
Copy link

Conzar commented Jan 15, 2024

I am also getting this error:

 Unable to read team member, got error: unable to update organization
│ member's team role, got error: PUT
│ https://SENTRY_URL/api/0/organizations/spm/members/2/: 400
│ map[teamRoles:[Invalid team-role]]

However, the user is added to the team with the 'admin' role which is what I specified.

@tokyowizard
Copy link

tokyowizard commented Jan 16, 2024

Hi @jianyuan,

what team role options do you see when you visit the team members' settings page?

We're on the Team plan https://sentry.io/pricing/ and I see this:

Screenshot 2024-01-16 at 10 27 38

I cannot change the roles. Clicking on the pull down menu for Contributor does not respond.

I'm also getting the same error:

│ unable to update organization member's team role, got error: PUT
│ https://sentry.io/api/0/organizations/[redact org name]/members/[redact member id]/: 400
│ map[role:[You do not have permission to set that org-level role]
│ teamRoles:[Invalid team-role]]

I tried also the following which none worked as expected unfortunately since we're on the team plan and as the docs mention that it'll specify a minimum team role when role is not set:

  • not setting role in sentry_team_member
  • role = null
  • role = local.user_list[member].role == "member" ? "contributor" : "admin"

I also tried importing the sentry_team_member.team_membership resource with role not set and apply even though there shouldn't be any changes, but it says it'll be updated in-place and get the same error.

@marcaurele
Copy link
Contributor

I'm facing the same error while being on the Business plan. It makes impossible to import any team member into Terraform.

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

No branches or pull requests

6 participants