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]: RANDOMLY github_actions_variable can't be created - root object was present, but now absent #2047
Howevever it randomly doesn't work and error occurs (described below)
Actual Behavior
github_actions_variable.repo,
provider "provider["registry.terraform.io/integrations/github"]" produced
an unexpected new value: Root object was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
Terraform Version
Terraform 1.6.4
integrations/github v5.42.0
Affected Resource(s)
github_actions_variable
Terraform Configuration Files
No response
Steps to Reproduce
No response
Debug Output
No response
Panic Output
github_actions_variable.repo,
provider "provider[\"registry.terraform.io/integrations/github\"]" produced
an unexpected new value: Root object was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
changed the title [-][BUG]: RANDOMLY repo variable can't be created - root object was present, but now absent [/-][+][BUG]: RANDOMLY github_actions_variable can't be created - root object was present, but now absent [/+]on Dec 6, 2023
I am getting the same error as well but for adding/updating branch protection and collaborators.
Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.repos.github_repository_collaborators.repo_collaborators["api"], provider
│ "provider[\"registry.terraform.io/integrations/github\"]" produced an unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
This is with terraform 1.5.7 and github provider 5.43.0
I have a similar error when trying to create multiple github_emu_group_mapping with a single team.
github_emu_group_mapping.DevOps["686806"]: Creation complete after 6s [id=teams/DevOps/external-groups]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to github_emu_group_mapping.DevOps["686807"], provider "provider[\"registry.terraform.io/integrations/github\"]" produced an unexpected new value: Root object was
│ present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.╵╷│ Error: Provider produced inconsistent result after apply│ │ When applying changes to github_emu_group_mapping.DevOps["686808"], provider "provider[\"registry.terraform.io/integrations/github\"]" produced an unexpected new value: Root object was│ present, but now absent.│ │ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
Same problem with github_actions_environment_variable:
Error: Provider produced inconsistent result after apply
When applying changes to
github_actions_environment_variable.my_variable, provider
"provider[\"registry.terraform.io/integrations/github\"]" produced an
unexpected new value: Root object was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
I've found a fix, going to create a PR for this resource only - but it might apply to all
Hi, I also found this bug to occur for github_actions_variable and also github_repository_file.
699 │ Error: Provider produced inconsistent result after apply
700 │
701 │ When applying changes to github_actions_variable.RUNNER_HOM-variable,
702 │ provider "provider[\"registry.terraform.io/integrations/github\"]" produced
703 │ an unexpected new value: Root resource was present, but now absent.
704 │
705 │ This is a bug in the provider, which should be reported in the provider's
706 │ own issue tracker.
312 │ Error: Provider produced inconsistent result after apply
313 │
314 │ When applying changes to github_repository_file.codeowners, provider
315 │ "provider[\"registry.terraform.io/integrations/github\"]" produced an
316 │ unexpected new value: Root resource was present, but now absent.
317 │
318 │ This is a bug in the provider, which should be reported in the provider's
319 │ own issue tracker.
320 ╵
The error is very inconsistent as noted by the issue and sometime it occurs to multiple resources during a single apply.
Hi, I also found this bug to occur for github_organization_repository_role.
resource "github_organization_repository_role" "wegmans_maintain" {
name = "Wegmans Maintain"
description = "Custom role for maintainers with additional permissions"
base_role = "maintain"
│ Error: error creating GitHub organization repository role (wegmans/Wegmans Maintain): POST https://api.github.com/orgs/wegmans/custom-repository-roles: 422 Name has already been taken []
│
│ with module.custom_roles.github_organization_repository_role.wegmans_maintain,
│ on modules/custom_roles/wegmans_maintainer.tf line 15, in resource "github_organization_repository_role" "wegmans_maintain":
│ 15: resource "github_organization_repository_role" "wegmans_maintain" {
│
╵
Error: Process completed with exit code 1.
I think your issue doesn't belong to this one as it has nothing in common that I can see.
The error you posted sounds like you might be adding a TF resource for an already existing Thing in the API. Could you elaborate what you did exactly to get this error?
Activity
[-][BUG]: RANDOMLY repo variable can't be created - root object was present, but now absent [/-][+][BUG]: RANDOMLY github_actions_variable can't be created - root object was present, but now absent [/+]CandiedCode commentedon Jan 8, 2024
I am getting the same error as well but for adding/updating branch protection and collaborators.
This is with terraform 1.5.7 and github provider 5.43.0
RobertAlbus commentedon Apr 30, 2024
I have a similar error when trying to create multiple
github_emu_group_mappingwith a single team.marcoths commentedon Sep 4, 2024
Same problem with
github_actions_environment_variable:I've found a fix, going to create a PR for this resource only - but it might apply to all
fele-systems commentedon Apr 29, 2025
Hi, I also found this bug to occur for
github_actions_variableand alsogithub_repository_file.The error is very inconsistent as noted by the issue and sometime it occurs to multiple resources during a single apply.
robabbott42 commentedon Dec 29, 2025
Hi, I also found this bug to occur for github_organization_repository_role.
resource "github_organization_repository_role" "wegmans_maintain" {
name = "Wegmans Maintain"
description = "Custom role for maintainers with additional permissions"
base_role = "maintain"
permissions = [
"view_dependabot_alerts",
"view_secret_scanning_alerts",
"write_repository_actions_environments"
]
}
│ Error: error creating GitHub organization repository role (wegmans/Wegmans Maintain): POST https://api.github.com/orgs/wegmans/custom-repository-roles: 422 Name has already been taken []
│
│ with module.custom_roles.github_organization_repository_role.wegmans_maintain,
│ on modules/custom_roles/wegmans_maintainer.tf line 15, in resource "github_organization_repository_role" "wegmans_maintain":
│ 15: resource "github_organization_repository_role" "wegmans_maintain" {
│
╵
Error: Process completed with exit code 1.
deiga commentedon Dec 29, 2025
Hey @robabbott42 👋
I think your issue doesn't belong to this one as it has nothing in common that I can see.
The error you posted sounds like you might be adding a TF resource for an already existing Thing in the API. Could you elaborate what you did exactly to get this error?