[BUG]: Changes are not being detected on github_repository
Expected Behavior
During terraform plan the provider should show changes between my github repo and the terraform config.
Actual Behavior
When trying to update allow_rebase_merge, and allow_squash_merge on my repo, the provider is not detecting any changes.
The config:
allow_merge_commit = true
allow_squash_merge = false
Terraform state matches config:
❯ terraform state pull | jq '.resources[151].instances[0].attributes | {allow_merge_commit, allow_squash_merge, etag}'
{
"allow_merge_commit": true,
"allow_squash_merge": false,
"etag": "W/\"79cc48f62fa91f6490cdf4ea43586e597d00aaaba67ea52f2382c7785d8d1a5e\""
}
But the resource itself looks like this when accessed via the API:
❯ gh api /repos/tekumara/baps-model-template | jq '{allow_merge_commit, allow_squash_merge}'
{
"allow_merge_commit": false,
"allow_squash_merge": true
}
Note that the etag on the actual resources matches the state etag:
❯ gh api --verbose /repos/tekumara/baps-model-template | grep 'Etag:'
< Etag: W/"79cc48f62fa91f6490cdf4ea43586e597d00aaaba67ea52f2382c7785d8d1a5e"
I'm not sure how the terraform state ended up with the correct etag, but the wrong values for allow_merge_commit and allow_squash_merge.
Terraform Version
❯ terraform --version Terraform v1.11.4 on darwin_arm64
- provider registry.terraform.io/hashicorp/aws v5.96.0
- provider registry.terraform.io/integrations/github v6.6.0
Affected Resource(s)
github_repository
Terraform Configuration Files
Steps to Reproduce
No response
Debug Output
Panic Output
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
NB: Etag appears to be based on the content of the github response and stable across time for the same set of response values.