0.9.11
I wouldn't have imagined that terraform state rm without arguments would delete all of the resources in the terraform.tfstate file. I think this should be treated as an erroneous command by the user.
TF removed all of the resource in the terraform.tfstate file.
If remote state is configured, it'll also sync the now bare tfstate up to the remote location.
terraform state rm
Thanks for filing the issue.
This is fixed in current releases by #15479.
How to remove all ?
@alwaysastudent:
terraform state rm "" as per this comment
@padamczewski
Unfortunately when I run terraform state rm "", I got the following error:
Error: Variable name required
on line 1:
(source code not available)
Must begin with a variable name.
I'm on terraform 0.12.6 by the way.
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.
Most helpful comment
@alwaysastudent:
terraform state rm ""as per this comment