-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
continual changes detected due to changing etag #796
Comments
I ran into the same problem after upgrading to Terraform 0.15.4. Deleting the repositories from the state with |
JIC - I also experience this problem on 0.15.4 and integrations/github v4.10 |
I just encountered this after upgrading from $ terraform plan
Acquiring state lock. This may take a few moments...
...
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the last "terraform apply":
# github_repository.foo has been changed
~ resource "github_repository" "foo" {
~ etag = <some value> -> <some other value>
id = "foo"
name = "foo"
# (23 unchanged attributes hidden)
}
Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or
respond to these changes.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
No changes. Your infrastructure matches the configuration.
Your configuration already matches the changes detected above. If you'd like to update the Terraform state to match, create and apply a refresh-only plan:
terraform apply -refresh-only
Releasing state lock. This may take a few moments... This behaviour seems consistent and expected as per the discussion on hashicorp/terraform#28803. As noted in the issue, using I don't think there is much we can do at a provider-level to mitigate this, so I propose that we close this issue and track hashicorp/terraform#28803 in the upstream project. |
Thanks for surfacing this information 🙇🏾 Pretty concerning from a performance perspective, so open to more ideas and can prioritize fixes accordingly. |
Ignoring this issue is not a good solution for many. |
They're not really ignoring the issue - they're just pointing out that ultimately the provider is working as expected, and terraform isn't honoring it as an expected change that should simply be updated in state quietly -- so ultimately it's on hashicorp to fix this. (Because they're not even accepting PRs from the community right now) |
Why not just remove etag from the state? I mean, it is a possible solution at a provider level. |
It's value is passed through to the HTTP |
I think that the |
The discussed change will go out in the next release. Please provide feedback on whether this helps as it was difficult to reproduce on my end. |
Looks like this change is not working, but causing issues: #910. Is there any other idea or do we need to hope for hashicorp/terraform#28803? |
Can you update on this? thanks! |
yep, also looking for an(y) update on this issue |
Same problem here. But in my case, I have an action that comment the result of plan in pull request comments. It causes a lot of noise and every time I try to update comments in pull request, the body is too large to comment. This module is working as expected, but I think the noise can cause another problems in workflow steps as in my case. |
Same problem here. |
Also looking for an update on this - it is making our plan very noisy |
Also looking for some hope around this topic. i wouldn't go so far as to say this is making our plan "invalid" but as we are using a plan as a part of our PR process... having to tell people to "just ignore that little thing there" is going to be an issue.... |
https://github.com/hashicorp/terraform/releases/tag/v1.2.0 includes hashicorp/terraform#30486. This may suppress the Has anyone on this issue upgraded to v1.2.0 yet and seen same/different behavior regarding |
@StephenWithPH I upgraded over the weekend and run v4.25.0 of the github provider. It is gone. The plan shows no diff. So to everyone who still has this issue: Upgrade to terraform 1.2.0 (or later if you see this in the future) and you should be good. Looks like this is resolved 🎉 |
I confirm, on terraform 1.2.0 no problem and no |
@morremeyer @arslanbekov ... thank you for confirming. Since the latest Terraform CLI suppresses the issue I raised on the GitHub provider, I'll close this issue. |
I'm still having same issue. |
We are still affected by this. terraform |
Hi @kfcampbell, I understand that you're busy, but is there any plan to fix this issue? I am aware that I also might be able to help you reproduce the issue if you still haven't yet. |
@ystndr would you mind sharing an HCL snippet that reproduces the issue? |
@kfcampbell I can confirm that the issue still exists even in the newer versions. |
Can we reopen this issue? Using Terraform Drift detection this causes a lot of false warnings. |
Sure, I've reopened the issue. PRs are always appreciated! |
Experiencing same Getting this for |
Unfortunately the SDK team at GitHub does not currently have the bandwidth to do feature development on existing SDKs at the moment. PRs are always appreciated though! |
We also have this issue with the |
Hello from 2024. Issue still present 😭
|
We are also experiencing this issue using the latest terraform version and GitHub provider v6.0.0-rc2. :( We are using terraform to map our IdP groups in our GitHub Enterprise and this issue is causing lots of confusion and extended plan\apply times. Example Plan: resource "github_emu_group_mapping" "group_mapping" { |
I too am having trouble with the
|
We had somewhat related issue with The only way to get away from drift was to recreate the resource, but doing so in code was tricky -- we used Before # module.github_team_default.github_team_sync_group_mapping.github_team_to_okta_group[0] will be updated in-place
~ resource "github_team_sync_group_mapping" "github_team_to_okta_group" {
id = "teams/team-example-renamed/team-sync/group-mappings"
# (2 unchanged attributes hidden)
- group {
- group_description = "github sso: team-example-renamed - example description" -> null
- group_id = "<redacted>" -> null
- group_name = "app_github_team_example_renamed" -> null
}
+ group {
+ group_description = "github sso: team-example-renamed-again - example description"
+ group_id = "<redacted>"
+ group_name = "app_github_team_example_renamed_again"
}
} After resource "terraform_data" "replacement" {
input = local.team_name
}
# configure github team to sync the membership from okta group
resource "github_team_sync_group_mapping" "github_team_to_okta_group" {
count = local.create_github_team_sync_group_mapping ? 1 : 0
team_slug = github_team.this[0].slug
group {
group_id = okta_group.this[0].id
group_name = okta_group.this[0].name
group_description = okta_group.this[0].description
}
lifecycle {
replace_triggered_by = [
terraform_data.replacement
]
}
} Output: # module.github_team_default.github_team_sync_group_mapping.github_team_to_okta_group[0] will be replaced due to changes in replace_triggered_by
-/+ resource "github_team_sync_group_mapping" "github_team_to_okta_group" {
~ etag = "W/\"32a1b30bb70d6ab2531548xxxxxxxxxxxxx\"" -> (known after apply)
~ id = "teams/team-example-renamed/team-sync/group-mappings" -> (known after apply)
# (1 unchanged attribute hidden)
- group {
- group_description = "github sso: team-example-renamed - example description" -> null
- group_id = "<redacted>" -> null
- group_name = "app_github_team_example_renamed" -> null
}
+ group {
+ group_description = "github sso: team-example-renamed-again - example description"
+ group_id = "<redacted>"
+ group_name = "app_github_team_example_renamed_again"
}
} I'm not sure if this is the same issue, if so -- let me know, I'll create a separate bug report. |
This is pretty annoying. If I add a lifecycle block to ignore changes to the etag and shar on a default branch, or etag and primary_language on the repo, I get warnings saying that's redundant.
But ignoring or not, Terraform emits a complaint that the parameter has changed:
Is this something that can actually be fixed in the provider? I really don't need warnings that people are committing to a repo or the default branch after I create it, so I'd very much like to fix this. |
I don't know if this was a provider issue after all since the team members and group update value change constantly. We got around this issue for external groups by pulling out the group id from the object using locals: locals { group_id = [for i, v in local.team : "${v}"] group_output_id = tolist(local.group_id)[0] |
Terraform Version
Affected Resource(s)
github_repository
Expected Behavior
After a successful
terraform apply
, subsequentterraform plan
orterraform apply
should detect no changes and have nothing to do.Actual Behavior
Every
terraform plan
orterraform apply
after creating the resource shows:Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
to create a GitHub repoterraform apply
again and see the above warning regarding changes toetag
Important Factoids
Because
etag
is not exposed on thegithub_repository
resource, it's not possible to mark it to be ignored.The text was updated successfully, but these errors were encountered: