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

Feature request for user organization membership #462

Open
pickgr opened this issue Jan 3, 2024 · 3 comments
Open

Feature request for user organization membership #462

pickgr opened this issue Jan 3, 2024 · 3 comments
Labels
enhancement New feature or request for consideration

Comments

@pickgr
Copy link

pickgr commented Jan 3, 2024

Hello,

I see that this provider supports managing Buildkite Teams and Buildkite user memberships to those teams. ie:

https://github.com/buildkite/terraform-provider-buildkite/blob/main/docs/resources/team_member.md

However, I don't see a resource for managing user membership to the Buildkite organization? This would be analogous to this resource in the github provider

https://registry.terraform.io/providers/integrations/github/latest/docs/resources/membership

Would this be possible? It would greatly simplify our onboarding/offboarding of users.

@james2791 james2791 added the enhancement New feature or request label Jan 4, 2024
@james2791
Copy link
Contributor

james2791 commented Jan 4, 2024

Hey @pickgr!

Hope you're well - thanks for the request - and hope you had a great New Year to welcome in 2024!

As of now, the provider doesn't have that functionality in place as you've seen, though team and team member operations are in place for when users are added to an organization beforehand.

As you've most likely seen, the provider's interaction in place is powered by our APIs (primarily with the provider - we use the GraphQL API) - and there are update and delete mutations in place for organization membership after users accept an invitation to an organisation. I believe something like a buildkite_organization_member resource would be what you'd expect to maintain - albeit with the need to import membership after its been made (as the creation process requires that invitation/acceptance to create membership), and then let Terraform update/delete membership in state, if thats what you envision? 😃

@pickgr
Copy link
Author

pickgr commented Jan 4, 2024

Hey @pickgr!

Hope you're well - thanks for the request - and hope you had a great New Year to welcome in 2024!

As of now, the provider doesn't have that functionality in place as you've seen, though team and team member operations are in place for when users are added to an organization beforehand.

As you've most likely seen, the provider's interaction in place is powered by our APIs (primarily with the provider - we use the GraphQL API) - and there are update and delete mutations in place for organization membership after users accept an invitation to an organisation. I believe something like a buildkite_organization_member resource would be what you'd expect to maintain - albeit with the need to import membership after its been made (as the creation process requires that invitation/acceptance to create membership), and then let Terraform update/delete membership in state, if thats what you envision? 😃

@james2791 - thanks for the response. Yes, what you are describing sounds what I was hoping could be implemented.

@james2791
Copy link
Contributor

No worries @pickgr!

We'll have a look at the potentiality of an implementation of said resource - with the known case that organization invitations do need to be accepted by users first so that their membership can be statefully maintained with those (currently) two mutations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for consideration
Projects
None yet
Development

No branches or pull requests

2 participants