terraform-provider-keycloak
terraform-provider-keycloak copied to clipboard
Consistency: keycloak_openid_client_service_account_role for both realm and client roles
Happened to notice a bit of an inconsistency.
When creating a role, providing or omiting client_id
distinguishes between realm- and client role: https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs/resources/role#client_id
That works quite nice.
However when needing to reference the role to add to a service account, one needs to work with different resource types:
- https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs/resources/openid_client_service_account_realm_role
- https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs/resources/openid_client_service_account_role
Those 2 only differ by the client_id
attribute that's present in the latter.
This could work in the same way as roles: A single resource type, where optional client_id
distinguishes between type of role.
(Admitted, probably 'nice to have' and not top prio, seeing the backlog of issues)