Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 219

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

    Correct Answer: B

    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.

Discussion
campsOption: B

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.

333e1abOption: B

How does examTopics evaluate correct answers?

TlakminiOption: B

it will update state file only

FarziWaliMarziOption: B

will update state file only

AlenKumarOption: B

Answer: B

bugalterOption: B

B. False

micropbl4Option: B

Command just remove it from the state file, but didn't touch existing resources

SilentMilliOption: B

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.