terraform-provider-http icon indicating copy to clipboard operation
terraform-provider-http copied to clipboard

request_timeout_ms ignored

Open diegopeinador opened this issue 1 year ago • 1 comments

Terraform CLI and Provider Versions

Terraform v1.8.0 on darwin_amd64

  • provider registry.terraform.io/hashicorp/azuread v2.48.0
  • provider registry.terraform.io/hashicorp/azurerm v3.99.0
  • provider registry.terraform.io/hashicorp/http v3.4.2
  • provider registry.terraform.io/hashicorp/random v3.6.1

Terraform Configuration

data "http" "public_ip_proxy" {
  url = "https://ipv4.icanhazip.com"
  request_timeout_ms = 120000
}

Expected Behavior

Terraform uses configured timeout when connecting to the URL

Actual Behavior

Terraform times out after 30 sec.

Steps to Reproduce

  1. Configure HTTP data source with a URL that takes more than 30 sec to reply (and timeout is configured accordingly).
  2. terraform apply
  3. Check that terraform times out after 30 sec.

How much impact is this issue causing?

High

Logs

No response

Additional Information

Screenshot 2024-04-16 at 11 32 57 My (somehow) complex config is taking 38 seconds to run terraform apply when the timeout is configured to 20 minutes.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

diegopeinador avatar Apr 16 '24 10:04 diegopeinador

I have the same issue

Terraform v1.9.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.57.0
+ provider registry.terraform.io/hashicorp/http v3.4.3
+ provider registry.terraform.io/hashicorp/tls v4.0.5
+ provider registry.terraform.io/kreuzwerker/docker v3.0.2
check "app_health" {
  data "http" "app" {
    url      = "${local.app_url}/health"
    insecure = true
    request_timeout_ms = 20 * 1000
  }

  assert {
    condition     = data.http.app.status_code == 200
    error_message = "${data.http.app.url} returned an unhealthy status code"
  }
}

Здымак экрана ад 2024-07-14 18-47-25

mikalai-hryb avatar Jul 14 '24 20:07 mikalai-hryb