terraform-provider-keycloak
terraform-provider-keycloak copied to clipboard
Add import attribute for keycloak_openid_client
Keycloak creates few openid clients by default (like account, account-console) and the only way to manage those clients with terraform is by manual import. This PR adds import
attribute to keycloak_openid_client
resources, which controls whether or not the client should be created or "imported". Note, that if import
attribute is true, the resource will not be removed during destruction.
With this change, for example, one can disable the account
client with a configuration like this:
resource "keycloak_realm" "realm" {
realm = "test-realm"
}
resource "keycloak_openid_client" "account" {
realm_id = keycloak_realm.realm.id
client_id = "account"
access_type = "PUBLIC"
enabled = false
import = true
}
Acceptance tests:
=== RUN TestAccKeycloakOpenidClient_import
=== PAUSE TestAccKeycloakOpenidClient_import
=== CONT TestAccKeycloakOpenidClient_import
--- PASS: TestAccKeycloakOpenidClient_import (19.38s)
Hi, How about this pull request? It is still valid? I need this feature.
@spirius Nice PR, is there something preventing to move forward?
I made some changes to this and opened a new PR #747.
Thanks for your work on this!