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

A fellow developer on your team is asking for some help in refactoring their Terraform code. As part of their application's architecture, they are going to tear down an existing deployment managed by Terraform and deploy new. However, there is a server resource named aws_instance.ubuntu[1] they would like to keep to perform some additional analysis.

What command should be used to tell Terraform to no longer manage the resource?

    Correct Answer: B

    B

    Reference:

    https://www.terraform.io/docs/cli/commands/state/rm.html

Discussion
EltoothOption: B

B is correct answer : terraform state rm "You can use terraform state rm in the less common situation where you wish to remove a binding to an existing remote object without first destroying it, which will effectively make Terraform "forget" the object while it continues to exist in the remote system." https://www.terraform.io/cli/commands/state/rm

campsOption: B

B. terraform state rm aws_instance.ubuntu[1] To tell Terraform to no longer manage a specific resource, you can use the terraform state rm command. This command removes the specified resource from the Terraform state file, effectively telling Terraform that the resource no longer exists.

Zam88Option: B

state rm The terraform state rm command is used to remove items from the Terraform state. This command can remove single resources, single instances of a resource, entire modules, and more B

Tyler2023Option: B

The answer is correct based on this https://developer.hashicorp.com/terraform/cli/commands/state/rm You can use terraform state rm in the less common situation where you wish to remove a binding to an existing remote object without first destroying it, which will effectively make Terraform "forget" the object while it continues to exist in the remote system.

habbypat123Option: B

The answer is B for sure

Ni33Option: B

BBBBBBBBBBB

Power123Option: B

B is correct. terraform state rm

eduvar4Option: B

https://developer.hashicorp.com/terraform/cli/commands/state/rm