Skip to content

OAuth2: mark token and organization parameters optional #190

Closed

Description

@kayrus

GiHub provider should not require GITHUB_TOKEN and GITHUB_ORGANIZATION. There are API calls, which don't require tokens.

Terraform Configuration Files

data "github_user" "github_keys" {
  username = "kayrus"
}

output "test" {
  value = "${data.github_user.github_keys.ssh_keys}"
}

Expected Behavior

$ terraform apply
data.github_user.github_keys: Refreshing state...

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

test = [
    ssh-rsa AAAAB3NzaC...
]

Actual Behavior

$ terraform apply
provider.github.organization
  The GitHub organization name to manage.

  Enter a value: 

provider.github.token
  The OAuth token used to connect to GitHub.

  Enter a value: 

data.github_user.github_keys: Refreshing state...

Error: Error refreshing state: 1 error(s) occurred:

* data.github_user.github_keys: 1 error(s) occurred:

* data.github_user.github_keys: data.github_user.github_keys: GET https://api.github.com/users/kayrus: 401 Bad credentials []

References

Official documentation says that these fields are already optional: https://www.terraform.io/docs/providers/github/index.html

Activity

  1. added
    Type: Feature
    on Feb 21, 2019
  2. megan07 commented on Jul 22, 2019

    @megan07
    Contributor

    Thanks @kayrus for opening this issue. It's been closed with #255 and will be released shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions