integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
905 stars 746 forks source link

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

Open kborowiec-mag opened 11 months ago

kborowiec-mag commented 11 months ago

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)

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

CandiedCode commented 10 months ago

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

RobertAlbus commented 6 months ago

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.
╵
marcoths commented 2 months ago

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