-1

Keycloak by default enables few built in clients when a new realm is created. I want to disable a built-in client for every realm created using Terraform.

How can I do it only using Terraform?

Sirish
  • 9,183
  • 22
  • 72
  • 107
  • Does this answer your question? [Keycloak: Way to manage default client roles assigned to a user in a realm](https://stackoverflow.com/questions/73581803/keycloak-way-to-manage-default-client-roles-assigned-to-a-user-in-a-realm) – Marko E Sep 04 '22 at 17:22
  • @MarkoE other question was specific to removing some roles from a client. This question is to completely disable a client with Terraform and not using REST API. – Sirish Sep 04 '22 at 18:48

2 Answers2

0

Since the default Terraform keycloak provider does not expose any resources for configuring built-in clients, one option is to use null_resource as described in another stackoverflow question Terraform REST API calls with cURL

Sirish
  • 9,183
  • 22
  • 72
  • 107
0

v4.0.0 of the Keycloak Terraform provider added the import argument to the keycloak_openid_client resource, which allows you to automatically import clients that Keycloak creates by default without needed to run terraform import.

https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs/resources/openid_client#import

Michael Parker
  • 12,724
  • 5
  • 37
  • 58