keycloak / terraform-provider-keycloak

Terraform provider for Keycloak
https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs
Apache License 2.0
648 stars 317 forks source link

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

Open boris-smidt-klarrio opened 4 months ago

boris-smidt-klarrio commented 4 months 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