You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a sandbox environment that allows a mix of clients managed by terraform and some manually provisioned resources. Occasionally, a client managed by Terraform gets deleted accidentally. Typically, Terraform will figure out that a resource was deleted while refreshing the state and offer to recreate it. However, for the keycloak_openid_client_default_scopes and keycloak_openid_client_optional_scopes resources, the missing client causes validation to fail during plan:
╷
│ Error: validation error: client with id <internal id> does not exist
│
│ with keycloak_openid_client_default_scopes.my_client,
│ on main.tf line 27, in resource "keycloak_openid_client_default_scopes" "my_client":
│ 27: resource "keycloak_openid_client_default_scopes" "my_client" {
│
Currently, the workaround is to use terraform state rm on the client scopes before running terraform apply again. Could we update the provider to accept missing state as valid and allow the scope associations to be recreated?
The text was updated successfully, but these errors were encountered:
@mrparkers is something that could be fixed in an upcoming release? I'm not super familiar with Go, but it seemed like this has a somewhat simple fix. If I contributed a PR I would need help putting a test case together, if that's needed.
Hi, I have a sandbox environment that allows a mix of clients managed by terraform and some manually provisioned resources. Occasionally, a client managed by Terraform gets deleted accidentally. Typically, Terraform will figure out that a resource was deleted while refreshing the state and offer to recreate it. However, for the
keycloak_openid_client_default_scopes
andkeycloak_openid_client_optional_scopes
resources, the missing client causes validation to fail during plan:Currently, the workaround is to use
terraform state rm
on the client scopes before runningterraform apply
again. Could we update the provider to accept missing state as valid and allow the scope associations to be recreated?The text was updated successfully, but these errors were encountered: