-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
shadow state and real state diverge when output is removed from module #9905
Comments
Hahhhhhh, so actually the new experimental feature is doing the right thing here, so this is actually exposing a bug with the old graph. I'll think about how to address this... |
Yup! Maybe a |
This makes the old graph also prune orphan outputs in modules. This will fix shadow graph errors such as #9905 since the old graph will also behave correctly in these scenarios. Luckily, because orphan outputs don't rely on anything, we were able to simply use the same transformer!
Fixed this by simply fixing the old graph in #9971. Hah. |
This makes the old graph also prune orphan outputs in modules. This will fix shadow graph errors such as #9905 since the old graph will also behave correctly in these scenarios. Luckily, because orphan outputs don't rely on anything, we were able to simply use the same transformer!
This makes the old graph also prune orphan outputs in modules. This will fix shadow graph errors such as hashicorp#9905 since the old graph will also behave correctly in these scenarios. Luckily, because orphan outputs don't rely on anything, we were able to simply use the same transformer!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
If, in the course of managing your infrastructure, you remove an output entry from a module, terraform does not purge it from
.tfstate
. This seems to be causing an issue with the new graph builders. This is valid for Terraform v0.7.9.Here is a reproduction configuration:
Given this, run
terraform apply
, then, remove this line from./test/vpc/main.tf
...then run
terraform apply
again. Every subsequent apply will show this output:If you manually remove the now obsolete output entry from
terraform.tfstate
this is resolved.The text was updated successfully, but these errors were encountered: