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

Print url in debug / error logs #361

Open
synfinatic opened this issue Nov 8, 2023 · 0 comments
Open

Print url in debug / error logs #361

synfinatic opened this issue Nov 8, 2023 · 0 comments

Comments

@synfinatic
Copy link

So due to a bug in my code, I effectively had my provider block defined as:

provider "elasticsearch" {
   url = ""
  healthcheck = false
}

This fails for obvious reasons. However, my bug was non-obvious and the log messages with TF_LOG=debug TF_ACC=1 were not helpful. The closest seems to be:

2023-11-08T08:44:43.108-0800 [INFO]  provider.terraform-provider-elasticsearch_v2.0.7: 2023/11/08 08:44:43 [INFO] couldn't create client: *errors.withStack, no active connection found: no Elasticsearch node available, *errors.withMessage: timestamp=2023-11-08T08:44:43.107-0800
2023-11-08T08:44:43.108-0800 [ERROR] vertex "elasticsearch_opensearch_role.event-trace" error: HEAD healthcheck failed: This is usually due to network or permission issues. The underlying error isn't accessible, please debug by disabling healthchecks.
2023-11-08T08:44:43.108-0800 [ERROR] vertex "elasticsearch_opensearch_role.event-trace (expand)" error: HEAD healthcheck failed: This is usually due to network or permission issues. The underlying error isn't accessible, please debug by disabling healthchecks.

Disabling healthchecks does not improve the message to indicate what the problem might be (also, it's confusing that this is still printed when healthcheck = false). Would of saved me a lot of time if the value of the url was contained somewhere in the log output.

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

No branches or pull requests

1 participant