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

REST API calls fail silently when TFE_HTTP_ADDR is not set correctly #316

Open
richard-russell opened this issue Feb 23, 2023 · 1 comment
Assignees
Labels
bug Something isn't working terraform

Comments

@richard-russell
Copy link

What is the bug?
When TFE_HTTP_ADDR is malformed, hcdiag GET checks fail silently with no errors reported in the output. Result is null, error is an empty string, and status is success.

In this case TFE_HTTP_ADDR was set to the hostname (tfe.example.com) instead of the full URL (`https://tfe.example.com')

"GET /api/v2/admin/organizations?page%5Bsize%5D=1": {
            "result": null,
            "error": "",
            "status": "success",

What version are you using?
Seen with hcdiag 0.4.0 and hcdiag-ext v0.3.0.

Which HashiCorp products does this affect?
Affects Terraform Enterprise.

When does the error occur?

  1. Set TFE_HTTP_ADDR to the TFE hostname without the https://
  2. Run hcdiag -terraform -config /path/to/hcdiag_terraform.hcl

What is the expected behavior?
Status and error fields should indicate a problem, e.g. "error": "TFE_URL not valid", "status": "fail",. hcdiag run should probably fail.

Is there a workaround?
Workaround is to supply the correct URL.

How does this impact you?
This caused a delay in generating hcdiag reports, as the customer was not aware the collection had failed. It is not an ongoing problem for us, but will most likely affect future customers.

Are there any deadlines?
No.

Is there any additional context?
No.

@aliciaclark1066
Copy link
Contributor

Thanks for submitting this request! We'll triage your comments once the team can focus on hcdiag again. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working terraform
Projects
None yet
Development

No branches or pull requests

2 participants