-
Notifications
You must be signed in to change notification settings - Fork 599
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
Error logging lacks information about faulty resource #4219
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
the debug (and trace) logs include this in the HTTP interactions. you search for the erroring response and the request is before it. the terraform output also shows you the resource it is targeting in the output, here |
Hi, Thanks for quick response. The request/response pairs are interleaved by other requests and it's laborous to uncover this info from trace, especially since many api calls do not include verbose information (for example they use ID instead of domain which adds another layer for searching the culprit). When the error occurs all I get is the unauthenticated error and not resource at all, here is example, censored output:
|
the output you've shown here looks to be from a terraform plan and will be lacking context as terraform attempts to refresh the resource. there isn't anything further we can do here as we're already returning a diagnostic which terraform returns to the end user. that's something you'll want to chat to the terraform core folks about if it currently missing (although i find it odd that it would). the request and response come one after another (much like any other HTTP client) and are sent to the logger in that order. what you're describing is a symptom of looking at all log drains instead of only the provider log drain which will include internal grpc calls and state management logging. you can view how to manage this via https://developer.hashicorp.com/terraform/plugin/log/managing |
Got it, thanks for clarification! |
Confirmation
Terraform and Cloudflare provider version
registry.terraform.io/cloudflare/cloudflare v3.25.0
Affected resource(s)
Any cloudflare resource.
Terraform configuration files
-
Link to debug output
Panic output
No response
Expected output
[Provider: mycloudflare_account_7 Module mymagicmodule.cloudflare_record.xyz]: Error: Authenticatin error(10000)
Actual output
Error: Authentication error (10000)
or if you search TF_LOG=TRACE you will find just a response with 403 without any link to which account/domain/resource it was related to.
Steps to reproduce
Is it possible for the error message to include the resource which triggered the authentication error? This spares literally hours of debugging.
Additional factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: