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

All Realm Attributes are Overwritten on Apply #1031

Open
AdosH1 opened this issue Dec 12, 2024 · 0 comments
Open

All Realm Attributes are Overwritten on Apply #1031

AdosH1 opened this issue Dec 12, 2024 · 0 comments

Comments

@AdosH1
Copy link

AdosH1 commented Dec 12, 2024

Describe the bug

When setting the realm attributes, all attributes are overwritten instead on the ones owned by the terraform provider.
This appears to be the complete opposite functionality to what is commented in the code on how this should work.

This has caused issues when extending Keycloak using realm attributes at runtime, where we lose those attributes upon terraform apply

Example fix for this issue: #1030

Version

25.0.6

Expected behavior

Terraform sets the realm attributes owned by the provider, without modifying the unmanaged attributes

Actual behavior

The provider overwrites realm attributes with only the values defined in Terraform

How to Reproduce?

  1. Define a keycloak realm and apply
resource "keycloak_realm" "myRealm" {
    ...
    attributes = {
        myCustomAttribute = "myCustomValue"
    }
  1. Define a custom realm attribute in myRealm (I did this programmatically)
  2. Reapply keycloak realm
  3. See that myCustomAttribute still exists, whereas the other custom realm attribute is gone

Anything else?

No response

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

No branches or pull requests

1 participant