terraform-provider-http
terraform-provider-http copied to clipboard
Feature request: Add timeout and retry option
Hi there,
Some time, http servers take some time to respond or are not ready yet to accept requests. It would be nice to add some kind of retry logic and timeout option to handle those use cases.
Please see https://github.com/terraform-providers/terraform-provider-aws/pull/11426 and specially https://github.com/terraform-providers/terraform-provider-aws/pull/11426#issuecomment-703716318.
Perhaps hashicorp/go-retryablehttp can help us to achieve this.
I can open a PR for this. But I want to know if this is something we can add in this provider and if it the right direction.
I cant open a PR for this, but i'm interest into this. Like a generic resource .. wait until available.
I would also like to see this feature added. I often get timeout errors such as this:
Error: Error making request: Get "http://ipv4.icanhazip.com": dial tcp 147.75.47.199:80: i/o timeout
Created https://github.com/hashicorp/terraform-provider-http/pull/71 to add support for client timeout. Handling retries is a bit trickier, as custom logic will be needed. Alternatively, this provider could leverage HashiCorp's own go-retryablehttp library.
Hello there,
I also created a PR linked to this issue https://github.com/hashicorp/terraform-provider-http/pull/87 Personally I think it would reduce random errors by retrying but also it can be used as some kind of http waiter.
Timeout and retry have been added into v3.3.0 of the http provider.
@antonbabenko I think we can remove this repo now https://github.com/terraform-aws-modules/terraform-provider-http (leaving the forked version on the registry though for backwards compatibility, users can move back over to this provider when they are ready)
@bryantbiggs Done - "This repository has been archived by the owner on Aug 6, 2023. It is now read-only."
And we can delete it in the future.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.