- Notifications
You must be signed in to change notification settings - Fork4
fix: support unmanaged roles on user resource#250
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
ImportStateId:"example", | ||
// We can't pull the password from the API. | ||
ImportStateVerifyIgnore: []string{"password"}, | ||
ImportStateVerifyIgnore: []string{"password","roles"}, |
ethanndicksonAug 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Because we're usingnull
to signify thatroles
shouldn't be managed by Terraform, we have the same problem we have with thegroup
resource: we don't know whether or not thenull
value was set in the config, or is null because it's an import. Frustratingly, the provider framework doesn't provide a way to differentiate the two.
ethanndickson commentedAug 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Merge activity
|
99877ea
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
A customer ran into an issue when creating an OIDC user while role sync was enabled on the deployment:
This is because we always call
UpdateUserRoles
onCreate
andUpdate
.OIDC User roles cannot be managed via the API if role sync is used, as the API always returns an error on any role update request.
With this PR,
roles
can now be set tonull
in the config, whereby the Terraform provider will not attempt to read or update the user's roles under any circumstances. This prevents config drift when roles are set via Role Sync.