-
Notifications
You must be signed in to change notification settings - Fork 948
Data source github_team returns 404 #655
Copy link
Copy link
Closed as not planned
Labels
AuthenticationProviderStatus: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseType: BugSomething isn't working as documentedSomething isn't working as documentedd/team
Description
Using the github_team data source with the latest provider version returns 404.
Terraform Version
✗ terraform -v
Terraform v0.13.6
- provider registry.terraform.io/hashicorp/aws v2.48.0
- provider registry.terraform.io/hashicorp/github v4.1.0
- provider registry.terraform.io/hashicorp/null v2.1.2
- provider registry.terraform.io/integrations/github v4.2.0
Affected Resource(s)
- github_team data source
Terraform Configuration Files
data "github_team" "team_details" {
for_each = var.teams
slug = each.key
}
resource "github_team_repository" "repository_team" {
for_each = var.teams
repository = github_repository.repository.name
team_id = data.github_team.team_details[each.key].id
permission = each.value
}and the provider configuration
terraform {
required_providers {
github = {
source = "integrations/github"
version = "4.2.0"
}
}
}
provider "github" {
version = "4.2.0"
organization = "myorg"
token = "blabla"
}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.
Error: GET https://api.github.com/orgs//teams/b2b: 404 Not Found []
on modules/repository/main.tf line 61, in data "github_team" "team_details":
61: data "github_team" "team_details" {
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Add the github_team data source.
- Make sure the organization information is set in the provider
- Issue
terraform apply
Important Factoids
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
AuthenticationProviderStatus: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseType: BugSomething isn't working as documentedSomething isn't working as documentedd/team
Type
Projects
Status
✅ Done