mrparkers / terraform-provider-keycloak

Terraform provider for Keycloak
https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs
MIT License
607 stars 295 forks source link

[Feature] Add an upsert flag on the client #978

Open boris-smidt-klarrio opened 1 month ago

boris-smidt-klarrio commented 1 month ago

Currently the client only has an import flag to import existing clients but when a client was created then the import has to be enabled. But when the import is enabled then the client will never be created even when somebody deleted it manually.

As an improvement i suggest to add an 'upsert' or 'adopt' flag. When enabled both the of the branches should be tried in the client part of the code.

https://github.com/mrparkers/terraform-provider-keycloak/blob/master/provider/resource_keycloak_openid_client.go#L530-L554