Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[keycloak_custom_user_federation] config not allowing commas #454

Closed
PaulGgithub opened this issue Jan 8, 2021 · 1 comment · Fixed by #455
Closed

[keycloak_custom_user_federation] config not allowing commas #454

PaulGgithub opened this issue Jan 8, 2021 · 1 comment · Fixed by #455

Comments

@PaulGgithub
Copy link
Contributor

PaulGgithub commented Jan 8, 2021

If the config from keycloak_custom_user_federation contains a comma, the plugin will ignore everything after the comma from that config.

Example:

resource "keycloak_custom_user_federation" "custom_user_federation" {
  name        = "User adapter provider"
  realm_id    = keycloak_realm.realm.id
  provider_id = "user-adapter-provider"

  enabled     = true

  config = {
    configWithComma = "this works,this will be ignored"
  }
}

Debug (note "configWithComma":["this works"]):

2021-01-08T21:29:35.904+0200 [DEBUG] plugin.terraform-provider-keycloak_v2.0.0: 
{
   "name":"User adapter provider",
   "providerId":"user-adapter-provider",
   "providerType":"org.keycloak.storage.UserStorageProvider",
   "parentId":"passwordless",
   "config":{
      "cachePolicy":[
         "DEFAULT"
      ],
      "configWithComma":[
         "this works"
      ],
      "enabled":[
         "true"
      ],
      "priority":[
         "0"
      ]
   }
}

This is most likely caused by splitting the config from comma here.

@tomrutsaert what was the reason for splitting by , ?

Thanks for this awesome provider!

@PaulGgithub PaulGgithub changed the title Custom user federation config not allowing commas [keycloak_custom_user_federation] config not allowing commas Jan 8, 2021
@tomrutsaert
Copy link
Contributor

tomrutsaert commented Jan 8, 2021

I have no idea, it has been a while.
Perhaps something I thought the value is supposed to be an array...., I do not know
Is most likely a mistake and thus a bug. It should most likely be config[key] = value
Feel free to make PR to change this behaviour and make test to proof it works

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

Successfully merging a pull request may close this issue.

2 participants