You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: group_description in github_team_sync_group_mapping constantly recreated on change #2423
When a group_description is changed in IdPs (for example Azure Entra), the change in github_team_sync_group_mapping should persist on applying Terraform.
Actual Behavior
When a group_description is changed in IdPs (for example Azure Entra), terraform see the change and try to update the group block in github_team_sync_group_mapping. However the change with the new group_description does not persist. During next runs, terraform still shows the difference and constantly will try to update.
This could be related on how GitHub API handles updates to Identity Provider Groups. Some observation on similarity in GitHub GUI that might be relevant:
Change description of Azure Entra group which is connected to GitHub team.
Go to GitHub team setting Identity Provider Groups. Entra group will have the old description. If we try to remove the Entra group and add it again, the Entra group description will be updated, but the changes to the group description are not saved on pressing save. The group should be removed, saved and then added again to reflect the change to the description.
Terraform Version
Terraform 1.9.7
integrations/github v5.45.0
Affected Resource(s)
github_team_sync_group_mapping
Terraform Configuration Files
No response
Steps to Reproduce
No response
Debug Output
No response
Panic Output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
Reacted by Peter Danko, zoe zhang, Jim Sheldon, Asbjørn Wiik, Chris Pinola, Kristian Petersen, niklasfaschingmoia, Adam Tibbing, Marco von Raumer, Javier Ruiz and 3 more
changed the title [-][BUG]: group_description in github_team_sync_group_mapping constantly recreated on change[/-][+][BUG]: `group_description` in `github_team_sync_group_mapping` constantly recreated on change[/+]on Oct 13, 2024
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
@deiga We are still facing this issue using the latest version of the provider.
In our case we have hundreds of Github teams which do not get the updated description which causes plenty of noise on every plan.
If this could be patched it would be much appreciated 🙂
@tibbing Thanks for confirming! Just to be safe we patch the right thing, could you provide DEBUG logs of the problematic terraform command?
I cannot share the full plan as it is over 65MB and contains PII, but I've tried to extract the relevant parts below with some ID:s redacted. Not sure how helpful it is though, please let me know if there's anything specific you need:
2026-02-13T14:12:33.3049996Z 2026-02-13T14:12:33.302Z [INFO] Terraform version: 1.14.5
2026-02-13T14:12:33.3050843Z 2026-02-13T14:12:33.302Z [DEBUG] using github.com/hashicorp/go-tfe v1.94.0
2026-02-13T14:12:33.3051661Z 2026-02-13T14:12:33.302Z [DEBUG] using github.com/hashicorp/hcl/v2 v2.24.0
2026-02-13T14:12:33.3052708Z 2026-02-13T14:12:33.302Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2026-02-13T14:12:33.3053584Z 2026-02-13T14:12:33.302Z [DEBUG] using github.com/zclconf/go-cty v1.16.3
2026-02-13T14:12:33.3054308Z 2026-02-13T14:12:33.302Z [INFO] Go runtime version: go1.25.6
2026-02-13T14:12:33.3055561Z 2026-02-13T14:12:33.302Z [INFO] CLI args: []string{"/home/runner/work/_temp/f74ef002-b5d1-4077-b459-14d98c214f72/terraform-bin", "fmt", "-check", "-diff", "-recursive"}
2026-02-13T14:12:33.3056966Z 2026-02-13T14:12:33.302Z [DEBUG] Attempting to open CLI config file: /home/runner/.terraformrc
2026-02-13T14:12:33.3057922Z 2026-02-13T14:12:33.302Z [INFO] Loading CLI configuration from /home/runner/.terraformrc
2026-02-13T14:12:33.3059270Z 2026-02-13T14:12:33.303Z [DEBUG] Explicit provider installation configuration is set
2026-02-13T14:12:33.3060213Z 2026-02-13T14:12:33.303Z [INFO] CLI command args: []string{"fmt", "-check", "-diff", "-recursive"}
2026-02-13T14:12:41.1484756Z - Installing integrations/github v6.11.1...
...
2026-02-13T14:13:15.7174513Z 2026-02-13T14:13:15.708Z [DEBUG] provider.terraform-provider-github_v6.11.1: Sending HTTP Request: @module=provider User-Agent=go-github/v82.0.0 tf_http_req_body="" tf_http_req_uri=/organizations/123123123/team/123123123 tf_http_req_version=HTTP/1.1 tf_provider_addr=provider @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/logging/logging_http_transport.go:162 Accept="application/vnd.github.v3+json,application/vnd.github.stone-crop-preview+json" Accept-Encoding=gzip X-Github-Api-Version=2022-11-28 tf_http_req_method=GET tf_resource_type=github_team tf_rpc=ReadResource tf_http_op_type=request tf_http_trans_id=dd83356b-b9bf-4d50-5f11-3f29ff2bd8cf Host=api.github.com tf_req_id=e982b494-2efd-53a3-400e-df1bb0a8eb34 timestamp=2026-02-13T14:13:15.708Z
...
2026-02-13T14:13:15.8335533Z 2026-02-13T14:13:15.831Z [DEBUG] provider.terraform-provider-github_v6.11.1: Received HTTP Response: tf_http_trans_id=4b20068e-3a9a-7570-0084-8dffb82c9e7e tf_resource_type=github_team @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/logging/logging_http_transport.go:162 Last-Modified="Thu, 13 Nov 2025 12:32:04 GMT" Vary="Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With" @module=provider Access-Control-Expose-Headers="ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" X-Ratelimit-Reset=1770993031 X-Ratelimit-Resource=core tf_http_res_version=HTTP/2.0 Etag="\"b87b5009cdcbcb203de46f573200a31c601ee5b838998966d752da6a2dc70dbb\"" tf_http_res_status_code=304 Date="Fri, 13 Feb 2026 14:13:15 GMT" Referrer-Policy="origin-when-cross-origin, strict-origin-when-cross-origin" X-Frame-Options=deny X-Github-Api-Version-Selected=2022-11-28 X-Github-Request-Id=F018:E96F4:370C47:EE3016:698F317B X-Ratelimit-Remaining=4882 tf_provider_addr=provider tf_req_id=8d1ee741-01ed-5cbc-dbe5-c5c4bfb1a1cd Server=github.com Content-Security-Policy="default-src 'none'" Strict-Transport-Security="max-age=31536000; includeSubdomains; preload" X-Content-Type-Options=nosniff tf_http_res_body="" tf_rpc=ReadResource Cache-Control="private, max-age=60, s-maxage=60" X-Ratelimit-Limit=5000 tf_http_op_type=response tf_http_res_status_reason="304 Not Modified" Access-Control-Allow-Origin="*" X-Ratelimit-Used=118 X-Xss-Protection=0 timestamp=2026-02-13T14:13:15.831Z
2026-02-13T14:13:15.8386076Z 2026-02-13T14:13:15.836Z [WARN] Provider "registry.terraform.io/integrations/github" produced an invalid plan for module.team_groups["my-team"].github_team.this, but we are tolerating it because it is using the legacy plugin SDK.
2026-02-13T14:13:15.8390108Z The following problems may be the cause of any confusing errors from downstream operations:
2026-02-13T14:13:15.8391208Z - .parent_team_id: planned value cty.StringVal("") for a non-computed attribute
2026-02-13T14:13:15.8392272Z - .create_default_maintainer: planned value cty.False for a non-computed attribute
2026-02-13T14:13:15.8393474Z - .notification_setting: planned value cty.StringVal("notifications_enabled") for a non-computed attribute
2026-02-13T14:13:15.8394548Z - .ldap_dn: planned value cty.StringVal("") for a non-computed attribute
...
2026-02-13T14:15:58.3093382Z 2026-02-13T14:15:55.941Z [DEBUG] ReferenceTransformer: "module.team_groups[\"my-team\"].github_team_sync_group_mapping.this" references: []
...
2026-02-13T14:16:17.2464214Z module.team_groups["my-team"].github_team_sync_group_mapping.this: Refreshing state... [id=teams/my-team/team-sync/group-mappings]
...
2026-02-13T14:16:32.6672486Z 2026-02-13T14:16:32.667Z [DEBUG] ProviderTransformer: "module.team_groups[\"my-team\"].github_team_sync_group_mapping.this" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/integrations/github"]
...
2026-02-13T14:16:32.7438050Z 2026-02-13T14:16:32.687Z [DEBUG] ReferenceTransformer: "module.team_groups[\"my-team\"].github_team_sync_group_mapping.this" references: [module.team_groups.github_team.this (expand) module.team_groups.var.github_team_sync_groups (expand) module.team_groups.var.name (expand) module.team_groups.var.name (expand)]
...
2026-02-13T14:16:35.2940871Z # module.team_groups["my-team"].github_team_sync_group_mapping.this will be updated in-place
2026-02-13T14:16:35.2942571Z ~ resource "github_team_sync_group_mapping" "this" {
2026-02-13T14:16:35.2943517Z id = "teams/my-team/team-sync/group-mappings"
2026-02-13T14:16:35.2944527Z # (2 unchanged attributes hidden)
2026-02-13T14:16:35.2945089Z
2026-02-13T14:16:35.2945479Z - group {
2026-02-13T14:16:35.2946518Z - group_id = "12312312-c0ee-4ade-bd95-dcb4e1d12532" -> null
2026-02-13T14:16:35.2947834Z - group_name = "SEC-TEAM-my-team" -> null
2026-02-13T14:16:35.2949143Z # (1 unchanged attribute hidden)
2026-02-13T14:16:35.2949848Z }
2026-02-13T14:16:35.2950470Z + group {
2026-02-13T14:16:35.2954341Z + group_description = "Engineering team my-team. Managed by Terraform."
2026-02-13T14:16:35.2956559Z + group_id = "12312312-c0ee-4ade-bd95-dcb4e1d12532"
2026-02-13T14:16:35.2957650Z + group_name = "SEC-TEAM-my-team"
2026-02-13T14:16:35.2958382Z }
2026-02-13T14:16:35.2959019Z }
And we create the group mappings like this:
# In root module, data.github_organization_team_sync_groups.this.groups is passed in as variabledata"github_organization_team_sync_groups""this" {}
resource"github_team""this" {
name=var.namedescription="Terraform-managed team ${var.name}. Members controlled by AD group SEC-TEAM-${var.name}."privacy="closed"
}
resource"github_team_sync_group_mapping""this" {
team_slug=github_team.this.slugdynamic"group" {
for_each=[
forginvar.github_team_sync_groups:gifg.group_name=="SEC-TEAM-${var.name}"
]
content {
group_description=group.value.group_descriptiongroup_id=group.value.group_idgroup_name=group.value.group_name
}
}
}
25. @KuiiMaldonado as before, there has been no PRs to address this
@deiga When you asked for the debug logs it sounded like you would make an attempt at patching it, hence the confusion here. Are you waiting for the community to submit a PR?
Activity
[-][BUG]: group_description in github_team_sync_group_mapping constantly recreated on change[/-][+][BUG]: `group_description` in `github_team_sync_group_mapping` constantly recreated on change[/+]chris-pinola-rf commentedon Jan 30, 2025
I've also noticed that Entra group descriptions containing line breaks are constantly detected as changed (even on v6.5.0).
github-actions commentedon Dec 6, 2025
👋 Hey Friends, this issue has been automatically marked as
stalebecause it has no recent activity. It will be closed if no further activity occurs. Please add theStatus: Pinnedlabel if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!deiga commentedon Dec 6, 2025
This sounds like the description would need to be set to ForceNew, if this is still happening
tibbing commentedon Feb 12, 2026
@deiga We are still facing this issue using the latest version of the provider.
In our case we have hundreds of Github teams which do not get the updated description which causes plenty of noise on every plan.
If this could be patched it would be much appreciated 🙂
1 remaining item
tibbing commentedon Feb 13, 2026
I cannot share the full plan as it is over 65MB and contains PII, but I've tried to extract the relevant parts below with some ID:s redacted. Not sure how helpful it is though, please let me know if there's anything specific you need:
And we create the group mappings like this:
tibbing commentedon Mar 20, 2026
@deiga Any guesses as to when we can hope to have this patched? 🙂
deiga commentedon Mar 22, 2026
@tibbing Nope. There isn't even a PR for it yet.
KuiiMaldonado commentedon Oct 9, 2026
@deiga We are experiencing the same issue described above. Any ETA for fixing this?
deiga commentedon Oct 10, 2026
@KuiiMaldonado as before, there has been no PRs to address this
tibbing commentedon Oct 10, 2026
@deiga When you asked for the debug logs it sounded like you would make an attempt at patching it, hence the confusion here. Are you waiting for the community to submit a PR?
deiga commentedon Oct 11, 2026
@tibbing I asked for DEBUG logs as that is what our issue template asks for and situationsl features like these can be hard to debug otherwise.
No, I wasn't specifically expecting the community to provide a PR for this, but neither have I assigned myself to this issue.
As there are only community volunteers maintaining this it will get addressed when someone has the capacity to do so.