hashicorp/terraform-provider-http

Failure behaviour

redzioch opened this issue · 1 comments

Terraform CLI and Provider Versions

TF 1.4.0, HTTP provider 3.4.0.

Use Cases or Problem Statement

Right now when HTTP request fails whole flow fails. I.e. when there is a problem with DNS or server just not responded.

Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Error making request
│ 
│   with data.http.info_json,
│   on ./main.tf line 1, in data "http" "info_json":
│    1: data "http" "info_json" {
│ 
│ Error making request: GET
│ http://api.*****/cli/get-info
│ giving up after 1 attempt(s)

Proposal

It would be nice to decide (like in provisioners) if we want to continue or fail (eg. https://developer.hashicorp.com/terraform/language/resources/provisioners/syntax#failure-behavior).

I am using this to collect statuses of few dozen servers and right now if anyone of them fails, I get TF error.

If it was possible to continue, I would just lost status of that server, instead of all of them.

How much impact is this issue causing?

Medium

Additional Information

No response

Code of Conduct

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

Are there any plans or ideas to tackle this enchancement?