TERRAFORM-ASSOCIATE-003 practice question 22 of 30
[Interact with Terraform Modules] A developer on your team is going lo leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu [l] they would like to keep. What command should they use to tell Terraform to stop managing that specific resource?
Full set: 226 questionsCorrect Answer:
TERRAFORM STATE RM
Explanation
Removing the resource’s address from the state file tells Terraform to “forget” that object, so later plans will ignore it rather than destroy it. The “terraform state rm
” command performs exactly this function; it detaches the specified resource (e.g., awsinstance.ubuntu[1]) from state management while leaving it running in the provider.References
1. HashiCorp Terraform CLI Command docs – “terraform state rm”
Purpose paragraph
developer.hashicorp.com/terraform/cli/commands/state/rm
2. HashiCorp Terraform Language Guides – State Management
section “Removing items from the state”
developer.hashicorp.com/terraform/language/state/manage#removing-items-from-the-state
Keep practicing
Take the free TERRAFORM-ASSOCIATE-003 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other TERRAFORM-ASSOCIATE-003 practice questions
- Question 1[Understand Terraform Basics and CLI] If you update the version constraint in your Terraf…
- Question 2[Navigate Terraform State and Backends] Terraform variable names are saved in the state f…
- Question 3[Understand Terraform Basics and CLI] You modified your Terraform configuration and run T…
- Question 4[Understand Terraform Basics and CLI] You must use different Terraform commands depending…
- Question 6[Understand Terraform Basics and CLI] terraform init creates an example main.tf file in t…
- Question 7[Understand Terraform Basics and CLI] terraform validate confirms that your infrastructur…
