Skip to content

[BUG]: terraform apply error with github_emu_group_mapping resource on v6.11.0 #3160

@jamesfernando94

Description

@jamesfernando94

Expected Behavior

When running a "terraform apply" with a github_emu_group_mapping resource I expect no errors

Actual Behavior

We see the following redacted error:

Error: -05T14:36:40.197Z [INFO]  provider.terraform-provider-github_v6.11.0: 2026/02/05 14:36:40 [ERROR] setting state: team_id: '' expected type 'string', got unconvertible type 'int64', value: '*******': timestamp=2026-02-05T14:36:40.197Z
Error: -05T14:36:40.197Z [ERROR] provider.terraform-provider-github_v6.11.0: Response contains error diagnostic: diagnostic_summary="team_id: '' expected type 'string', got unconvertible type 'int64', value: '******'" tf_proto_version=5.10 tf_resource_type=github_emu_group_mapping @module=sdk.proto tf_provider_addr=provider tf_req_id=*** tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_detail="" diagnostic_severity=ERROR timestamp=2026-02-05T14:36:40.197Z
Error: -05T14:36:40.198Z [ERROR] vertex "module.module_name.github_emu_group_mapping.github_emu_mapping_resource" error: team_id: '' expected type 'string', got unconvertible type 'int64', value: '***'
 ╷
│ Error: team_id: '' expected type 'string', got unconvertible type 'int64', value: '*******'
│ 
│   with module.module_name.github_emu_group_mapping.github_emu_mapping_resource,
│   on modules/module_name/main.tf line 69, in resource "github_emu_group_mapping" "github_emu_mapping_resource":
│   22: resource "github_emu_group_mapping" "github_emu_mapping_resource" {
│ 
╵

Terraform Version

Terraform 1.10 (Also tested on 1.14)
integrations/github Version 6.11.0 (Works on 6.10.2)

Affected Resource(s)

  • github_emu_group_mapping

Terraform Configuration Files

data "github_external_groups" "groups" {}

locals {
  map_of_groups = {
    for group in data.github_external_groups.groups.external_groups : group.group_name => group
  }
}

resource "github_team" "users" {
  name        = "users"
  description = "Team of users mapped to AD Group ${var.ad_group}"
  privacy     = "closed"
}

resource "github_emu_group_mapping" "github_emu_mapping_resource" {
  team_slug = github_team.users.slug
  group_id  = tostring(local.map_of_groups[var.ad_group].group_id)
}

Steps to Reproduce

No response

Debug Output

Error: -05T14:36:40.197Z [INFO]  provider.terraform-provider-github_v6.11.0: 2026/02/05 14:36:40 [ERROR] setting state: team_id: '' expected type 'string', got unconvertible type 'int64', value: '*******': timestamp=2026-02-05T14:36:40.197Z
Error: -05T14:36:40.197Z [ERROR] provider.terraform-provider-github_v6.11.0: Response contains error diagnostic: diagnostic_summary="team_id: '' expected type 'string', got unconvertible type 'int64', value: '******'" tf_proto_version=5.10 tf_resource_type=github_emu_group_mapping @module=sdk.proto tf_provider_addr=provider tf_req_id=*** tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_detail="" diagnostic_severity=ERROR timestamp=2026-02-05T14:36:40.197Z
Error: -05T14:36:40.198Z [ERROR] vertex "module.module_name.github_emu_group_mapping.github_emu_mapping_resource" error: team_id: '' expected type 'string', got unconvertible type 'int64', value: '***'
 ╷
│ Error: team_id: '' expected type 'string', got unconvertible type 'int64', value: '*******'
│ 
│   with module.module_name.github_emu_group_mapping.github_emu_mapping_resource,
│   on modules/module_name/main.tf line 69, in resource "github_emu_group_mapping" "github_emu_mapping_resource":
│   22: resource "github_emu_group_mapping" "github_emu_mapping_resource" {
│

Panic Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions