- Notifications
You must be signed in to change notification settings - Fork4
PermalinkChoose a base ref {{ refName }}default Choose a head ref {{ refName }}default Checking mergeability… Don’t worry, you can still create the pull request.
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also orlearn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also.Learn more about diff comparisons here.
base repository:coder/terraform-provider-coderd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
Uh oh!
There was an error while loading.Please reload this page.
base:main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}defaultLoading
...
head repository:coder/terraform-provider-coderd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
Uh oh!
There was an error while loading.Please reload this page.
compare:fix/oidc-user-roles-empty-list
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}defaultLoading
Uh oh!
There was an error while loading.Please reload this page.
- 4commits
- 1file changed
- 3contributors
Commits on Aug 14, 2025
fix: add proper OIDC user role validation
When creating OIDC users, the provider was calling UpdateUserRoleseven with empty roles due to the default schema value, causing theserver error "User Role Field is set in the OIDC configuration".OIDC users should get their roles exclusively from the OIDC provider'srole mapping, not from explicit API calls. This fix:- Errors if explicit roles are provided for OIDC users- Skips role assignment entirely for OIDC users- Provides clear error messaging about OIDC role behavior🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
Commits on Aug 15, 2025
fix: prevent config drift for OIDC users in Read function
Update the Read function to not populate roles from server response for OIDC users.This prevents Terraform from detecting config drift when OIDC users have rolesassigned by the OIDC provider but an empty roles list in the Terraform config.Addresses review comment about config drift in PR#247.Co-authored-by: angrycub <464492+angrycub@users.noreply.github.com>
refactor: improve code style with consistent negative conditions
Update OIDC user role handling to use cleaner Go style:- Use negative conditions (loginType != codersdk.LoginTypeOIDC) for better readability- Simplify comments to be more concise and inline- Maintain all existing validation logic and functionalityCo-authored-by: angrycub <464492+angrycub@users.noreply.github.com>
style: run go fmt to fix formatting
Fix formatting issues found by go fmt, specifically the closing braceplacement in the ImportState function.Co-authored-by: angrycub <464492+angrycub@users.noreply.github.com>
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:git diff main...fix/oidc-user-roles-empty-list
Uh oh!
There was an error while loading.Please reload this page.