Hi Everyone
I need to update the terrform.tfstate file
Is there any way with commands we can do or need to do manually .
For ex: i need to update the index of subnet so that it ignore while running tf plan
Manually i am able to do it but just wanted to if there any command .
Hello,
It sounds like you’re trying to converge the state of the real world to your declaration. Perhaps a different perspective on what you need may help?
Updating the the terraform state file should typically only be done by terraform itself.
If you’ve written a declaration which is detecting changes based on the index of an entry, it sounds like you’re using a count
instead of a map, which may re-arrange the items from plan to plan. If you would like to ignore the changes in a specific block, you can use the lifecycle { ignore_changes }
declaration. See: