terraform-provider-github: [BUG]: `github_team_repository` error with version 5.9.0 - fails with `at least one permission expected from permissions map`
Terraform Version
1.3.3
Affected Resource(s)
github_team_repository
If this issue appears to affect multiple resources, it may be an issue with Terraform’s core, so please mention this.
Terraform Configuration Files
resource "github_team_repository" "push_access" {
for_each = toset(var.push_access_team_ids)
repository = github_repository.repository.id
team_id = each.value
permission = "push"
}
Debug Output
[PENDING] Please provide a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
Panic Output
N/A
Expected Behavior
Access should be refreshed, changes should be proposed by terraform plan
Actual Behavior
terraform plan errors:
╷
│ Error: at least one permission expected from permissions map
│
│ with module.easyhotel_docker_compose_repository.github_team_repository.push_access["6845313"],
│ on modules/easyhotel_github_repository/main.tf line 34, in resource "github_team_repository" "push_access":
│ 34: resource "github_team_repository" "push_access" {
│
╵
Steps to Reproduce
With existing repo/permissions
terraform planwill fail with above error
With non-existing permissions (permissions need to be created by this terraform run)
terraform applywill create the permission/s above (verified that access was given by checking the GitHub web UI), but the apply will still fail with the same error above.
Important Factoids
Is there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Similar error messages (not the same cause I guess):
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 67
- Comments: 27 (4 by maintainers)
Commits related to this issue
- fix(#1373): comment problematic code (until better fix) — committed to jhaumont/terraform-provider-github by jhaumont 2 years ago
- Switching from make test to make testacc make test runs nothing but make testacc runs the actual acceptance tests. Running acceptance tests would have prevented issue https://github.com/integrations/t... — committed to elliottpope/terraform-provider-github by elliottpope 2 years ago
- github_team_repostiory fix is available in Github provider version5.9.2. https://github.com/integrations/terraform-provider-github/issues/1373 — committed to motatir/github_terraform by deleted user 2 years ago
There’s a fix for the issue in #1384. Confirmed the acceptance tests for github_team_repository pass after introducing this change
workaround
Released: GitHub | Terraform registry
@nickfloyd https://github.com/integrations/terraform-provider-github/pull/1382 is a stab at fixing this in a way that doesn’t break the new feature that was added
5.9.1 wasn’t a fix for this issue @oprudkyi
Any idea when we can get this fix implemented. Also thank you @jhaumont for digging into all of this and finding a resolution.
It works for me with 5.9.2. We are using
github_team_repository.something wrong, 5.9.1 fails with the same error
We also are seeing this exact issue. Thanks for finding the issue @jhaumont. Is this able to be reverted as soon as possible please? I need the other features of 5.8.0 and 5.9.0.
Thanks for chasing this down @jhaumont!
stone-crop-previewis for the Team Review Assignments preview from the docs.The change landed in #1356, specifically in 934f06a
I think I found the issue: https://github.com/integrations/terraform-provider-github/pull/1356/files#diff-062b7a475c9ddd7765fd96c620a3f7854307a4b68c0ff57db24b9d912b5bcec9R42 cc @elliottpope