I set up terraform to use a backend to remotely store the statefile. That works fine.
My project take several minutes for the full terraform apply
to complete. During development, sometimes one of the later stages hangs (seemingly) eternally. I need the outputs in order to manually connect to the servers and inspect what is broken. However, the statefile does not get written until the terraform process completes. So there are no outputs available during the first terraform apply
.
Is there a way to make terraform update the statefile intermediately, while it is still busy applying things?
I know I could solve this by separating the process into multiple modules, and apply each one after the other. But I am looking for a solution where I can still apply all at once.
When you run
you get the outputs also. What you can do is save that file before applying -
Then you apply. You can look into this file to find the changes.
Best wishes.