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

Support for creating repositories under owner account #607

Closed
linuxbsdfreak opened this issue Nov 16, 2020 · 2 comments
Closed

Support for creating repositories under owner account #607

linuxbsdfreak opened this issue Nov 16, 2020 · 2 comments
Labels
github_enterprise Provider Status: Stale Used by stalebot to clean house Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@linuxbsdfreak
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v0.13.5

  • provider registry.terraform.io/hashicorp/github v4.0.0

Affected Resource(s)

Github Enterprise

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

main.tf

terraform {
  required_providers {
    github = "~> 4.0.0"
  }
}

provider "github" {
  token        = var.gh_token
  owner        = var.gh_owner
  base_url     = var.gh_api_url
}

resource "github_repository" "test-repo" {
  name        = var.gh_repo_name
  description = "Test Repo"
  visibility  = "private"
}

variables.tf

variable "gh_api_url" {
  type      = string
  default   = "https://github.internal.repo/api/"
}

variable "gh_repo_name" {
  type      = string
  default   = "test-repo"
}

variable "gh_token" {
  description = "GitHub token"
  default   = "TOKEN_VAL"
}

variable "gh_owner" {
  description = "GitHub Owner"
  default   = "username"
}

Debug Output

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

It should have created the repo under the user account under Github. It works only under GH Organizations.

Actual Behavior

terraform apply -auto-approve
github_repository.test-repo: Creating...

Error: GET https://github.internal.repo/login?return_to=https%3A%2F%2Fgithub.internal.repo%2Fapi%2Fapi%2Fv3%2Fuser%2Frepos: 406  []

  on main.tf line 13, in resource "github_repository" "test-repo":
  13: resource "github_repository" "test-repo" {

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Github Enterprise

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Dec 7, 2022
@kfcampbell kfcampbell added Priority: Normal Status: Triage This is being looked at and prioritized labels Dec 8, 2022
@github-actions github-actions bot removed the Status: Stale Used by stalebot to clean house label Dec 8, 2022
Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Apr 23, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_enterprise Provider Status: Stale Used by stalebot to clean house Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

4 participants