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

Realm User Profile's multi_valued attribute does not persist to Keycloak #1099

Closed
stephan-at-jane opened this issue Jan 28, 2025 · 1 comment · Fixed by #1106
Closed

Realm User Profile's multi_valued attribute does not persist to Keycloak #1099

stephan-at-jane opened this issue Jan 28, 2025 · 1 comment · Fixed by #1106

Comments

@stephan-at-jane
Copy link

Describe the bug

When using the new multi_valued property of the keycloak_realm_user_profile resource introduced in v5.1.0, the value does not save correctly within Keycloak. The multi-valued toggle is always OFF and the Terraform plans always show an in-place update from false to true for the attribute.

Version

26.0.7

Expected behavior

The multi_valued attribute value should be persisted in Keycloak and not show up as a changed attribute in the terraform plans.

Actual behavior

The multi_valued attribute never takes on the true value and always shows up in the terraform plans.

# module.example.keycloak_realm_user_profile.example will be updated in-place
~ resource "keycloak_realm_user_profile" "example" {
    id                         = "example"
    # (2 unchanged attributes hidden)

    ~ attribute {
        ~ multi_valued      = false -> true
        name                = "exampleAttribute"
        # (4 unchanged attributes hidden)
        # (1 unchanged block hidden)
    }

    # (8 unchanged blocks hidden)
}

How to Reproduce?

  • Create a keycloak_realm_user_profile resource
  • Add an attribute to the user profile resource which sets the attribute's multi_valued property to true.
  • The plan and result should always show the multi_valued property being updated from false to true.
  • The Keycloak admin interface for realm settings → user profile → the created attribute will have the multi-valued toggle in the OFF position.

Anything else?

No response

@sschu
Copy link
Contributor

sschu commented Jan 31, 2025

@stephan-at-jane The fix for this has just been releases in 5.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants