You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
The provider is configured with the correct <organisation_key> value.
Is the expectation that we have added the user to the Organization and hence into the default Group via the SonarCloud UI first, before we can user sonarcloud_user_group_member to add the user to some other subsequent Group in SonarCloud.
Sorry for not getting back to you on this sooner. Indeed, the sonarcloud_user_group_member expects a user to have been added to the organization beforehand. If you have set up automatic synchronization (i.e. with GitLab/GitHub/BitBucket/Azure DevOps), this is kinda done automatically, with the caveat that a users has to have logged in at least once with that integration to be a member. At least, that's how it works for GitHub.
If you have enabled automatic synchronization, you can still assign users to a group, but you'd have to filter local.sonarcloud_to_be_added_users for users that are known by SonarCloud. You can use the data.sonarcloud_user_group.members_group.users for that. I can give you an example using setunion if that would be helpful 🙂. (As a side note: the Members group is read-only and always contains all the members of the org.)
Regarding the add_member endpoint: the Golang module is generated automatically and therefore only implements API endpoints that are documented under the web_api page. I've started a branch to implement arbitrary API calls using generics, but I haven't got the time to finish that at the moment.
Let me know if that answers your question 🙂.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When adding users to a SC group via sonarcloud_user_group_member (Resource) we are getting the following error message:
Our Terraform looks like this:
The provider is configured with the correct
<organisation_key>
value.Is the expectation that we have added the user to the Organization and hence into the default Group via the SonarCloud UI first, before we can user
sonarcloud_user_group_member
to add the user to some other subsequent Group in SonarCloud.We can see that adding users via the SonarCloud UI calls
api/organizations/add_member
, which doesn't appear to be documented https://sonarcloud.io/web_api/, nor is it implemented in the Golang Module https://github.com/reinoudk/go-sonarcloud.The text was updated successfully, but these errors were encountered: