Using the terraform state rm command against a resource will destroy it.
Using the terraform state rm command against a resource will destroy it.
The terraform state rm command removes a resource's entry from the Terraform state file, meaning Terraform will no longer manage or track that resource. However, the resource itself will still exist in your infrastructure. This does not destroy the actual resource; it simply stops Terraform from knowing about it. To destroy the resource, you should use the terraform destroy command or modify your configuration to remove the resource and run terraform apply.
B. False Using the terraform state rm command does not destroy the actual resource. Instead, it removes the resource's entry from the Terraform state file. As a result, Terraform will no longer manage or track the resource. However, the resource itself will still exist in your infrastructure. If you want to destroy the resource, you should use the terraform destroy command or modify your configuration to remove the resource and run terraform apply.
How does examTopics evaluate correct answers?
it will update state file only
will update state file only
Answer: B
B. False
Command just remove it from the state file, but didn't touch existing resources
The terraform state rm command removes a resource from the Terraform state file without destroying the actual resource in your infrastructure. This command is typically used when you want to delete a resource that was not created using Terraform, or when you want to remove a resource from the Terraform state file for some other reason, such as to re-create the resource using a different configuration.