-
Notifications
You must be signed in to change notification settings - Fork 769
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
Misleading error message when GITHUB_TOKEN not set #598
Comments
Has anyone got a workaround for this issue? |
Does this relate to the fix that was shipped in |
Hello everyone, I hope you are all well :) Terraform version: 1.0.7; With the following terraform code, I get a
Full error:
The plugin error, checking DEBUG logs is as follows:
When I setup my env var GITHUB_TOKEN correctly with a permission-sufficient PAT , it works without problem.
Thanks! |
👋 Hey Friends, this issue has been automatically marked as |
We're seeing this (or a similar issue) with 5.7.0. In our case, we're seeing hangs when someone doesn't have the Also, dear bot, we can't add the |
Thanks for the notice, I've pinned the issue and I'll look into why label permissions aren't working. PRs for adding appropriate error messages are appreciated! |
Thanks! We're generally happy to send PRs, but given that we don't currently see an error message in the first place, we're not entirely sure where to start. |
The hanging thing is very weird. The error message in the original issue is found here, which might help. |
When configuring the provider with only the
organization
property and relying on theGITHUB_TOKEN
environment variable for authentication, if the environment variable hasn't been set,apply
andimport
operations display the following error message:This is misleading as the actual error is a missing credential.
After setting the environment variable, everything works as expected.
Terraform Version
0.13.5
Affected Resource(s)
Have only reproduced this with
github_membership
andgithub_team
, but it probably applies to more.Terraform Configuration Files
Expected Behavior
A more accurate error message should be displayed, like
Error: Missing GITHUB_TOKEN environment variable.
Actual Behavior
I received the error message
Error: This resource can only be used in the context of an organization, "" is a user.
and subsequently spent an hour debugging the provider config trying to figure out why when I supplyorganization
it's being interpreted as an empty string.Steps to Reproduce
terraform apply
; orterraform import github_membership.member "example-org:lukiffer"
The text was updated successfully, but these errors were encountered: