Skip to content
New issue

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

Failure behaviour #294

Open
1 task done
redzioch opened this issue Jul 7, 2023 · 1 comment
Open
1 task done

Failure behaviour #294

redzioch opened this issue Jul 7, 2023 · 1 comment

Comments

@redzioch
Copy link

redzioch commented Jul 7, 2023

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
@maciejr2
Copy link

Are there any plans or ideas to tackle this enchancement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants