-
Notifications
You must be signed in to change notification settings - Fork 741
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
[BUG]: repo_id attribute not generated #1940
Comments
Hey @neilharris123 Thanks for reaching out. The following is where
For clarity, were you expecting to see it somewhere else as well? Have a look at this test that makes use of |
@nickfloyd ,the issue is with That said, I too run into a similar issue. When referencing variable "repositories" {
type = map(string)
}
data "github_team" "administrators" {
slug = "code-security"
}
data "github_repository" "owned" {
for_each = var.repositories
name = each.key
}
resource "github_team_repository" "maintainership" {
for_each = data.github_repository.owned
team_id = "@code-security"
repository = each.value.name
permission = "push"
} yields: │ Error: "repository": required field is not set
│
│ with module.repositories.github_team_repository.maintainership["my-repo"],
│ on modules/repositories/main.tf line 40, in resource "github_team_repository" "maintainership":
│ 40: resource "github_team_repository" "maintainership" {
│
╵ As there's no |
This issue actually masks the actual bug: loading up repositories not owned by the GITHUB_TOKEN does not raise an error if the repo isn't found. Instead of raising an error, it silently nulls all attributes instead. |
Expected Behavior
The documentations attribute reference suggests an attribute name repo_id should be available.
However, non of our repos attributes contain this key.
Actual Behavior
All other attributes exist, but
repo_id
does not.Terraform Version
Terraform 0.13.7
integrations/github version 5.39.0
Affected Resource(s)
Terraform Configuration Files
No response
Steps to Reproduce
No response
Debug Output
No response
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: