keycloak-config-cli
keycloak-config-cli copied to clipboard
If the whole realm object is deleted from JSON file - it is not deleted from the keycloak on the json file import
Current Behavior
If the whole realm object is deleted from JSON file - it is not deleted from the keycloak on the json file import
Expected Behavior
As the imported JSON files are being considered as a single source of truth and the desired state - we could not rely on this concept anymore, as the config in JSON files does not reflect the actual config in the keycloak.
Please note that the "import.remote-state.enabled" is set to "false". So theoretically it should purge all the condfiguration that is not in the JSON file.
Steps To Reproduce
1. Deploy Keycloak
2. Run importer and import multiple realms
3. Delete one realm JSON object from file
4. It is still seen in the GUI after re-importing the JSON
Environment
- Keycloak Version: 21.1.1
- keycloak-config-cli Version: 5.6.1
Anything else?
No response
Hi @roman-aleksejuk-telia, this tool is meant to only change realms which are provided in the import. I also can't imagine any use case why a realm should be deleted through automation. Just in case someone would mess up the file this would mean that all of your users would be deleted, it's not a good idea to add this feature 😉