State file not been updated. How so? #1698
-
At the company I work for, we recently upgraded OpenTofu to version 1.7.1 from 1.6.0. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @mdaleo404 , this behaviour shouldn't have changed in OpenTofu. I wasn't able to reproduce this behaviour locally when upgrading from 1.6.0 to 1.7.1 Which backend are you using? |
Beta Was this translation helpful? Give feedback.
OK I've taken a deeper look. I do see that the behaviour here is different when you compare the local backend and an S3 backend. In the local backend, the state does get updated with the new tofu version. However, in the S3 backend, the state does not change at all
I took a look at the behaviour in Terraform, and seems like backends used to update the version of the binary in the state up until ~1.3.0, when the behaviour has changed to not update the state if there are no changes.
So seems like indeed as you wrote in the original comment here, that an apply isn't actually warranted when there are no changes to the configuration