Reputation: 564
For some unknown reason, the removed items remain in the state file after I remove from the .tfstate
file.
CASE:
my_statefile.tfstate
) from cloud_bucket where it's storedterraform init
terraform state list -state=my_statefile.tfstate
output:
item 1
item 2
item 3
terraform state rm -state=my_statefile.tfstate item1
terraform state list -state=my_statefile.tfstate
output:
item 2
item 3
However when I inspect the file with cat my_statefile.tfstate
the item 1
is still there..
I even created a empty file called empty.tfstate
and tried the flow described above and got the same results which is kind of odd.
Does anyone have any clues on what can be happening here?
Upvotes: 0
Views: 39