Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn 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
base: main
Choose a base ref
...
head repository: coder/terraform-provider-coderd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix/oidc-user-roles-empty-list
Choose a head ref
  • 4 commits
  • 1 file changed
  • 3 contributors

Commits on Aug 14, 2025

  1. fix: add proper OIDC user role validation

    When creating OIDC users, the provider was calling UpdateUserRoles
    even with empty roles due to the default schema value, causing the
    server error "User Role Field is set in the OIDC configuration".
    
    OIDC users should get their roles exclusively from the OIDC provider's
    role 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>
    angrycub and claude committed Aug 14, 2025
    Configuration menu
    Copy the full SHA
    d8d4d6f View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2025

  1. 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 roles
    assigned 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>
    blink-so[bot] and angrycub committed Aug 15, 2025
    Configuration menu
    Copy the full SHA
    e7df6a1 View commit details
    Browse the repository at this point in the history
  2. 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 functionality
    
    Co-authored-by: angrycub <464492+angrycub@users.noreply.github.com>
    blink-so[bot] and angrycub committed Aug 15, 2025
    Configuration menu
    Copy the full SHA
    9ecc2e1 View commit details
    Browse the repository at this point in the history
  3. style: run go fmt to fix formatting

    Fix formatting issues found by go fmt, specifically the closing brace
    placement in the ImportState function.
    
    Co-authored-by: angrycub <464492+angrycub@users.noreply.github.com>
    blink-so[bot] and angrycub committed Aug 15, 2025
    Configuration menu
    Copy the full SHA
    2e40dab View commit details
    Browse the repository at this point in the history
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy