terraform-provider-keycloak
terraform-provider-keycloak copied to clipboard
keycloak_openid_client_scope is not setting Assigned Type field
In the Master realm, I am generating client scope using keycloak_openid_client_scope resource. It created scope with Assigned Type as None. I need to set it as Default. I don't see any option to set the assigned type. Am I missing anything?
I need this, too. Seems like in https://github.com/mrparkers/terraform-provider-keycloak/blob/10e59625b45741464ca3c34a3fba07011981e6a5/provider/resource_keycloak_openid_client_scope.go, the type
field is missing.
This way, we can not create scopes that are default for every new client - which is a pain.
It would be fine to have that.
I use keycloak_openid_client_default_scopes
to set default client scopes für single clients like this:
resource "keycloak_openid_client_default_scopes" "client_default_scopes" {
realm_id = keycloak_realm.isium.id
client_id = keycloak_openid_client.weave.id
default_scopes = [
"acr",
"profile",
"email",
"roles",
"web-origins",
keycloak_openid_client_scope.groups_scope.name,
]
}
keycloak_openid_client_default_scopes seems to have no effect for me.
The Assigned type for a custom keycloak_openid_client_scope remains to "None" in the GUI, despite the terraform apply running fine.
Just checking if there was some progress on this ?
Thanks!
We also need this...
EDIT1: Looked at the APIs, it looks like you need to use /admin/realms/[realm]/default-optional-client-scopes
/ /admin/realms/[realm]/default-optional-client-scopes
/ /admin/realms/[realm]/default-default-client-scopes
API, so we could change keycloak_openid_client_optional_scopes
and keycloak_openid_client_default_scopes
resources to make client_id
optional to manage the realm defaults/optionals