Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions provider/resource_keycloak_realm.go
Original file line number Diff line number Diff line change
Expand Up @@ -1327,9 +1327,11 @@ func setRealmData(data *schema.ResourceData, realm *keycloak.Realm) {
webAuthnPasswordlessPolicy["user_verification_requirement"] = realm.WebAuthnPolicyPasswordlessUserVerificationRequirement
data.Set("web_authn_passwordless_policy", []interface{}{webAuthnPasswordlessPolicy})

attributes := map[string]interface{}{}
var attributes map[string]interface{}
if v, ok := data.GetOk("attributes"); ok {
for key := range v.(map[string]interface{}) {
existingAttributes := v.(map[string]interface{})
attributes = existingAttributes
for key := range existingAttributes {
attributes[key] = realm.Attributes[key]
//We are only interested in attributes managed in terraform (Keycloak returns a lot of doubles values in the attributes...)
}
Expand Down
Loading