HashiCorp Certified: Terraform Associate — Question 122

Using the terraform state rm command against a resource will destroy it.

Answer options

Correct answer: B

Explanation

The correct answer is B because the terraform state rm command removes the resource from the Terraform state file without actually destroying the resource in the infrastructure. Therefore, the resource remains intact in the environment, while Terraform is no longer aware of it. Option A is incorrect as it misrepresents the function of the command.