-
Notifications
You must be signed in to change notification settings - Fork 770
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
Data source github_team returns 404 #655
Comments
I'm experiencing the same issue. It looks like the org information is not being pulled from the provider's configuration, but from the token. My config looks like:
This should hit the endpoint:
But it is instead hitting:
With |
Yup, same here. It's ignoring everything in the provider block. I was trying to pass creds in via variables.
It always returns Or I get rate limited because it's not authenticating. Workaround: Use environment vars for both. |
This is much broader than the data source, the provider is not inferring the organization from the provider in any circumstance for me. You may want to rename your bug. |
It's a regression since 2.9. I can't say when – I'm only finally able to upgrade now that github_branch_protection_v3 exists. |
Same here. After using the workaround by @jspiro and using environment vars for both everything works fine. |
FYI I'm hitting a similar issue using resource "github_team" - I'll try to open another issue on this when I have more time. |
@eleni-salamani, @jspiro, @aliculPix4D, I believe that this is the same issue as #696 and #697. As the output of According to the debug output in the gist @eleni-salamani, it looks like If you genuinely need to use both providers, then you need to configure both providers using local names. However, it's also possible that your Terraform configuration is accidentally referring to All modules that you want to use
|
@tibbes Many thanks for the reply. For the time being we have switched to using purely the |
I was excited to move to
And as soon as I replaced my provider using:
all github stuff broke. Tried a few things, but didn't fix it. So, just removing the source in required_providers fixed the problem for me. Serves me right to be jumping to the new stuff immediately. |
Can confirm the same experience. integrations/github is absolutely shattered by the above. |
|
I confirm having the same problem as above, and switching to |
For me it worked to set the org name as |
Doesn't work here as of the latest. Still the same problem using GITHUB_OWNER |
@kfcampbell, I experienced all the symptoms described here but with a different resource ( Unfortunately, in my case, this meant I had to do a major refactoring because I was using two separate GitHub providers to manager repos in two different organisations, so I had to break up the workspace into two (one for each org) -- even though I really would've preferred to keep everything in one workspace. |
It seems within a module, if a "github" required_providers block is not defined, the (deprecated?) "hashicorp/github" provider is used. For example, in order to resolve terraform's 404 errors to the github api, I needed to:
terraform {
required_version = ">= 1.0.5"
required_providers {
github = { // does not apply to modules
source = "integrations/github"
version = "4.20.0"
}
}
}
provider "github" {
app_auth {
id = 1234
installation_id = 5678
pem_file = var.github_app_pem_file
}
owner = "my-org-or-acct"
}
module "secrets" {
source = "./modules/secrets"
}
terraform {
required_providers {
github = { // explicit provider block for github is required, else hashicorp/github source is used
source = "integrations/github"
version = "4.20.0"
}
}
}
data github_repository "some-repo" {
name = "some-repo"
}
// then some resource that uses data.github_repository.some-repo If the github provider is not explicitly defined in the module, |
The above solution will not work as my data is in
|
Moved all code to
|
Hi, I'm using terraform cloud as remote backend and I can said none of the above solutions works for me, when using either local backend or s3 bucket it works just fine. Any hints/discoveries on this? |
👋 Hey Friends, this issue has been automatically marked as |
I have a similar issue where I am trying to use the resource github_actions_environment_secret. Used the API directly to confirm the PAT and payload were correct and because I define the URL is worked 100%. Seeing similar issues |
@nickfloyd any updates on this issue? |
Using the github_team data source with the latest provider version returns 404.
Terraform Version
✗ terraform -v
Terraform v0.13.6
Affected Resource(s)
Terraform Configuration Files
and the provider configuration
Debug Output
https://gist.github.com/eleni-salamani/bf0a8d0173700c95e6451ff6c78600a7
Panic Output
Expected Behavior
The data source should return the team information so that it can be used in further resources.
Actual Behavior
The call returns 404. It seems the API call is not built correctly as the organization is not set.
https://github.com/integrations/terraform-provider-github/blob/master/github/data_source_github_team.go#L57
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: