Skip to content

[BUG]: RANDOMLY github_actions_variable can't be created - root object was present, but now absent  #2047

Closed

Description

@kborowiec-mag

Expected Behavior

Variable for repository is created.

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

Code of Conduct

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

Activity

  1. added
    Status: Triage
    Type: Bug
    on Dec 6, 2023
  2. 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
  3. added
    Status: Up for grabs
    and removed
    Status: Triage
    on Jan 4, 2024
  4. moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Activeon Jan 4, 2024
  5. CandiedCode commented on Jan 8, 2024

    @CandiedCode

    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

  6. RobertAlbus commented on Apr 30, 2024

    @RobertAlbus

    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.
    ╵
  7. marcoths commented on Sep 4, 2024

    @marcoths

    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

  8. fele-systems commented on Apr 29, 2025

    @fele-systems

    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.

  9. robabbott42 commented on Dec 29, 2025

    @robabbott42

    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.

  10. deiga commented on Dec 29, 2025

    @deiga
    Collaborator

    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?

  11. moved this from Backlog to In Progress in Terraform Provideron Jan 19, 2026
  12. added this to the v6.11.0 Release milestone on Feb 3, 2026
  13. removed
    Status: Up for grabs
    on Feb 3, 2026
  14. moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Activeon Feb 3, 2026
  15. moved this from In Progress to Done in Terraform Provideron Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Bug

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions