-
Notifications
You must be signed in to change notification settings - Fork 277
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
Error: Provider produced inconsistent final plan #1040
Comments
Thanks for the write up! Could you share what version of the terraform provider you're using? To best reproduce the issue, could you share the config file you're trying to apply? |
Hi @danaelhe We are using the provider digitalocean/digitalocean at version 2.30 I will provide a comment with the configuration used - mind you it is working now. I specified dependencies between various resources strictly with depends_on and also changed the dependency graph manually, since many resources are involved and the implicit graph seemed to cause this and other issues. What still happens from time to time is that a destroy isn't able to destroy all resources. Sometimes either the project or the project main vpc fail to delete. Re-running destroy always succeeds in destroying the remaining resource/s though. |
|
Hmmm...that's interesting. Thanks for providing additional context. I agree with your hunch that it could be something up with the terraform dependency graph since adding explicit dependencies seems to mitigate the error'd behavior. I'm going to do some research and see if there's any opportunity for optimization for our provider to best direct terraform's dependency graphs. I haven't been able to get the destroy error yet, but I'll keep trying at it 🤞 |
@danaelhe sorry I am not of more help right now. I did not record the full config when the error happened since I was busy trial-ing my way to success. Once I have more time at hands I could try recreating, but I am not sure when that will be. To give a little more context: I've also had dependency issues when destroying the infra with that setup, as the cluster was destroyed and terraform then tried dialing the datasource when the cluster was not existing anymore. Funnily enough I had a dependency on the cluster but it still errored. I was able to also resolve this with the explicit dependency graph throughout the entire infra. Again what I wasn't able to resolve is the destroy issue of the project mentioned above. But that also only happens in 50% of the cases. (We are creating and destroying infra regularly, think of it as preview deployments for pull requests) Edit: I would be willing to take the time and go through the whole config in a call if that would be helpful. I sadly cannot provide access to the repository. |
Provider produced inconsistent final plan when running terraform apply without refreshing with existing tfstate
Affected Resource(s)
Expected Behavior
terraform apply to apply all changes required
Actual Behavior
Steps to Reproduce
The text was updated successfully, but these errors were encountered: