We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform v1.7.0
Terracurl does not provide an option to override the Host using Host header, similar to curl.
curl
data "terracurl_request" "home" { name = "home" url = "https://d2mxderzerczer.cloudfront.net" method = "GET" headers = { "Host" = "www.example.com" } response_codes = [ 200, ] max_retry = 1 retry_interval = 3 }
Origin has host header checks and return 400 Bad request if wrong host is provided.
Since the header overrides Host with correct value, should return 200.
Returns 400.
My use case is, I'm adding an end to end test using terraform checks to validate the response codes and headers.
check "home_page" { data "terracurl_request" "home" { name = "home" url = "https://d2mxderzerczer.cloudfront.net" method = "GET" headers = { "Host" = "www.example.com" } response_codes = [ 200, ] max_retry = 1 retry_interval = 3 } assert { condition = data.terracurl_request.home.status_code == 200 error_message = "${data.terracurl_request.home.url} returned an unhealthy status code" } }
This issue is similar to the http provider issue. hashicorp/terraform-provider-http#311
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Terraform Version
Terraform v1.7.0
Terracurl does not provide an option to override the Host using Host header, similar to
curl
.Terraform Configuration Files
Origin has host header checks and return 400 Bad request if wrong host is provided.
Expected Behavior
Since the header overrides Host with correct value, should return 200.
Actual Behavior
Returns 400.
Use case
My use case is, I'm adding an end to end test using terraform checks to validate the response codes and headers.
References
This issue is similar to the http provider issue. hashicorp/terraform-provider-http#311
The text was updated successfully, but these errors were encountered: