Pasting this query into an organisation repository searchorg:my-org fork:true will return only repositories that are forks.
I would expect Terraform to behave the same as the GitHub UI.
data "github_repositories" "all" {
query = "org:my-org fork:true"
}
output "length" {
value = length(data.github_repositories.all.names)
}
Output = Total count of repos within the organisation that are forks. e.g. 10
Actual Behavior
Terraform instead returns all repositories, including forks of the organisation. Omitting fork:true causes the data source to return all repositories that are not forks.
data "github_repositories" "all" {
query = "org:my-org fork:true"
}
output "length" {
value = length(data.github_repositories.all.names)
}
Output = Total count of repos within the organisation. e.g. 100
Terraform Version
1.7.5
Affected Resource(s)
github_repository (Data source)
Terraform Configuration Files
No response
Steps to Reproduce
$ terraform plan
Debug Output
No response
Panic Output
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Expected Behavior
Pasting this query into an organisation repository search
org:my-org fork:true
will return only repositories that are forks.I would expect Terraform to behave the same as the GitHub UI.
Output = Total count of repos within the organisation that are forks. e.g. 10
Actual Behavior
Terraform instead returns all repositories, including forks of the organisation. Omitting
fork:true
causes the data source to return all repositories that are not forks.Output = Total count of repos within the organisation. e.g. 100
Terraform Version
1.7.5
Affected Resource(s)
Terraform Configuration Files
No response
Steps to Reproduce
$ terraform plan
Debug Output
No response
Panic Output
No response
Code of Conduct