Removing Items from Terraform State
Learn how to use the rm subcommand in Terraform.
The rm
subcommand
The terraform state rm
command is used to remove items from the Terraform state.
Syntax
The rm
subcommand has the following syntax: terraform state rm [options] ADDRESS
.
Use of the terraform state rm
command
We can use this command to remove a single resource, a single instance of a resource, entire modules, and more. The resources removed by the command are removed from the state file ...