Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add option to configure the Keycloak client timeout #155

Merged
merged 1 commit into from
Sep 13, 2019

Conversation

LoicGombeaud
Copy link

Our Keycloak instance is sometimes a bit slow to respond:

module.release_environment.keycloak_realm.realm: Creating...

Error: Post https://keycloak.is4.local/auth/admin/realms: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

  on .terraform/modules/release_environment/main.tf line 5, in resource "keycloak_realm" "realm":
   5: resource "keycloak_realm" "realm" {

The request is cancelled, but the realm does get created, which leads to a conflict on subsequent terraform apply calls; and since the realm is not in the Terraform state, a terraform destroy does not solve the issue.

This PR allows for the Keycloak client timeout to be configurable, while keeping the default value of 5 seconds.

@LoicGombeaud
Copy link
Author

LoicGombeaud commented Sep 11, 2019

The tests are failing, but the failures don't seem related to my changes

edit: all green now :)

@LoicGombeaud
Copy link
Author

ping @mrparkers , what do you think about this?

Copy link
Contributor

@fharding1 fharding1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, and I've had this (timeouts) happen to me when I'm on a slow network connection.

@mrparkers
Copy link
Contributor

Sorry for the delayed review. This looks great, I was actually starting to run into issues with this myself.

Thanks for the contribution!

@mrparkers mrparkers merged commit 6582455 into keycloak:master Sep 13, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants