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

Updating user roles fails #41

Open
denraf opened this issue Apr 24, 2023 · 1 comment
Open

Updating user roles fails #41

denraf opened this issue Apr 24, 2023 · 1 comment
Assignees

Comments

@denraf
Copy link

denraf commented Apr 24, 2023

When updating an existing user, by adding a role, terraform gives an error:

squadcast_team_member.myuser: Modifying... [id=633b36ab5a2d05780fc8132c]
╷
│ Error: PATCH https://api.squadcast.com/v3/teams/633b36ba5a2d05780fc81332/members/633b36ab5a2d05780fc8132c?owner_id=633b36ba5a2d05780fc81332 returned an error:
│ [400] user is assigned to 1 squads. please remove from the squads
│ 
│   with squadcast_team_member.myuser,
│   on teams.tf line 13, in resource "squadcast_team_member" "myuser":
│   13: resource "squadcast_team_member" "myuser" {

Code before:

resource "squadcast_team_member" "myuser" {
  team_id  = squadcast_team.myteam.id
  user_id  = squadcast_user.myuser.id
  role_ids = [squadcast_team_role.user.id]
}

Code after:

resource "squadcast_team_member" "myuser" {
  team_id  = squadcast_team.myteam.id
  user_id  = squadcast_user.myuser.id
  role_ids = [squadcast_team_role.user.id, squadcast_team_role.squad_admin.id]
}
@roshan8
Copy link
Collaborator

roshan8 commented Feb 22, 2024

@denraf We are unable to replicate this. Can you check if you are still facing this issue?

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

3 participants