-
Notifications
You must be signed in to change notification settings - Fork 11
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] Adding a user to multi namespaces seems to re-create the user each time and not just give them read access #119
Comments
This PR addresses #119, #116, and #115 by decoupling the definition of user accesses from the user itself, via a new resource: `temporalcloud_user_namespace_access`. This resource is intended to provide a many-to-many mapping between namespaces and users. Under the hood, this resource is manipulating a single User object via the API (as the underlying data model stashes all namespaces accesses on the user object), while also preserving the invariant that adding or removing a single user from a single namespace won't obliterate the list of permissions that a user has. I do intend to write some more tests but I wanted to get this out quickly for review for some fast feedback before I write a bunch of tests that exercise things that might change in review.
@swgillespie Can I close this issue ? |
This should be resolved with the solution for #109 |
@tony-powell-sp we're struggling to recreate this scenario. Do you have more details or ways we can reproduce. |
I was able to reproduce. Here are the steps
terraform1.TF
terraform2.TF
|
RCA - current logic for creating a user in Temporal allows for "re-inviting" users while their invitation is open, "not accepted". The impact from the API is that the API will not fail a create request for an existing user. |
document as side-effect and behavior of the current underlying API. Also, recommend this is not best practice for TF. |
docs addressed by #192 |
also addressed by the Temporal docs PR temporalio/documentation#3219 |
thanks @jlacefie I agree that terraform is not the best place but we have had issues trying to use the sdk to do the user management so we are just wanting to find a reliable method so that this is not a hand driven process and uniformity is across the environment!! |
glad you where able to re-create the condition :) |
The first pass of this issue is resolved with documentation guidance. |
What are you really trying to do?
Create a user and assign to a namespace with a defined role so this is managed through code but each time it appears to re-create the user and they only have access to last namespace created.
Describe the bug
Minimal Reproduction
Environment/Versions
Additional context
The text was updated successfully, but these errors were encountered: