-
Notifications
You must be signed in to change notification settings - Fork 948
github_user data source should support current authenticated user #260
Copy link
Copy link
Closed
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseType: FeatureNew feature or requestNew feature or requestUpstream
Description
Terraform Version
$ terraform version
Terraform v0.12.5
+ provider.github v2.2.0
Affected Resource(s)
github_userdata source
Terraform Configuration Files
provider "github" {
individual = true
version = "2.2.0"
}
data "github_user" "current" {
username = ""
}
output "github_current_login" {
value = data.github_user.current.login
}Expected Behavior
The current authenticated user's github login is printed as a terraform output.
Actual Behavior
$ terraform apply
data.github_user.current: Refreshing state...
Error: GET https://api.github.com/user/gpg_keys: 404 Not Found []
on main.tf line 6, in data "github_user" "current":
6: data "github_user" "current" {
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
go-github/v27 allows using an empty string for the username to fetch the current user's details. This API call seems successful. However, the API calls to get GPG and SSH seems to be using the username argument which can be an empty string.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseType: FeatureNew feature or requestNew feature or requestUpstream