-
Notifications
You must be signed in to change notification settings - Fork 75
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
Terraform keeps saying there's a change to be applied to a heroku_config
resource, even after applying.
#350
Comments
Hi @oboxodo 😄 I don't know how config vars being set directly on that app would affect this, because Honestly, this Would you please try adding a new Hopefully the replacement will not show this behavior. Please let us know how it goes. |
Hi @mars, thanks for your suggestion. I did as you suggested... creating a new The new resource was created just fine. But then if I plan/apply again, having made zero changes, I get the same unexpected result :'(
|
Maybe something changed in |
Perhaps a Terraform Plugin SDK update would fix it. Currently at |
Sorry for the late reply, @mars. I wasn't able to focus on this again until now.
I upgraded the heroku provider from 5.1.6 to 5.1.9, and terraform itself from 1.3.4 to 1.3.6 and the result continues being the same 😢. |
Can you reproduce this issue in an isolated, complete Terraform config? Are you positive that nothing dynamic is impacting the I took your example config to attempt reproducing the bug using the same versions, but the configuration works correctly for me. It applies cleanly. I also noticed that your have Finally, is your tfvars file dynamically generated? Could it be the source of the changes? |
I wonder if using a sensitive variable as a value for a resource attribute causes this constant diff. What if you drop
|
@davidji99 sensitivity of vars had no effect in my attempt to reproduce this issue. |
Good to know! |
I've been experiencing a very similar issue:
I can apply the configuration, but immediately running it again flags the same resources to be updated in place. This is with Terraform 1.0.11 and heroku-provider 5.2.4 I don't use a separate |
Terraform Version
Affected Resource(s)
Terraform Configuration Files
This is a simplified and anonymized version but should represent faithfully the core of my config.
Debug Output
I am uploading only the tail of the output I got from executing
TF_LOG=trace terraform apply -var-file=secrets.tfvars 2>trace.log
which I think might cover what you need as it mentionsheroku_config
a lot and it seems to end with an error. I'd rather not upload the complete output as it could have sensitive info. But if you tell me something specific to look for I could do that.Tail of debugging trace: https://gist.github.com/oboxodo/f463c7217a0b119669cb901b5062cdab
Panic Output
No panic.
Expected Behavior
Executing a
plan
afterapply
ing a change should say there's nothing to change.Actual Behavior
The same change keeps being reported as needed, even after applying it successfully (which really does nothing). I also tried applying a real change, adding a new env var. It added the new env var and then again it continued saying there's a change to apply with no real diff.
Steps to Reproduce
terraform plan
says there's a change to apply inheroku_config
resource, but no diff.terraform apply
shows the same empty needed change. Type "yes" and confirm. It ends saying it applied the change.terraform plan
keeps showing the same empty change needed inheroku_config
resource.Here you can see an anonymized execution from my console:
Important Factoids
This started happening after we added a couple of env vars via Heroku's CLI, then we removed them. So no real diff should be shown. Plus, after this I've applied other changes via terraform and it keeps saying
heroku_config
needs an update 🤷♂️.State is in Terraform Cloud. I tried both local and remote execution and result is the same.
Here's a screenshot so you see exactly what I see with both
plan
andapply
.The text was updated successfully, but these errors were encountered: