terraform-provider-keycloak icon indicating copy to clipboard operation
terraform-provider-keycloak copied to clipboard

Support for Scope configuration on realm level is incomplete

Open thomasdarimont opened this issue 3 years ago • 3 comments

In PR #464 we introduced support for the configuration of client scopes on realm level.

As it turned out this was not complete and needs to be reworked.

Custom scopes are created during realmImport via RepresentationToModel#realmImport

thomasdarimont avatar Jan 25 '21 11:01 thomasdarimont

It's been almost 3 years and this feature still doesn't work (despite the feature being in the documentation for the keycloak_realm resource) and this issue is still open. We have hit this same problem now at my company. Is there going to be any movement on this?

blajoie55 avatar Nov 17 '23 21:11 blajoie55

We also have the same problem and had to make an additional API call. Is it planned to be fixed?

Thanks

nicolas-urbantz avatar Jan 21 '24 13:01 nicolas-urbantz

It might be worth considering moving the attribute realm.default_default_client_scopes to a separate resource. Similar to how it is handled on a per-client basis via keycloak_openid_client_default_scopes

It's easy to hit chicken-egg dependency problems in the current setup:

  • Adding a new client scope requires realm to exist
  • Then how to add a non-built-in client scope to the default_default_client_scopes list that is part of the realm definition?

TBeijen avatar Mar 07 '24 09:03 TBeijen