Re:Keycloak: Open-source identity and access management
by markbaikal on Wednesday April 15, 2020 @01:12AM
(#22874741)
We used the ansible module at work but we had to fork it internally and extend it heavily. I would suggest you try https://github.com/mrparkers/terraform-provider-keycloak instead, because terraform cleans up after itself (it deletes resources that you deleted from code, rather than leaving them behind) and terraform is also much faster, because it auto-parallelizes according to the dependency graph. The terraform provider also seems much better maintained than the ansible module.
And yes, the keycloak api is inconsistent.
I use various home made Ansible roles and I find the Keycloak API to be inconsistent.
Eg: Various GET methods that doesn't return complete payload and some endpoints that doesn't save on POST but they do when updating.
That said, it's very hard to keep an idempotency with the actual state of the API.
I haven't yet tested the keycloak-operator [1].
[1]: https://github.com/keycloak/keycloak-operator