Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 266


A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don’t know which VM Terraform manages but do have a list of all active VM IDs.

Which of the following methods could you use to discover which instance Terraform manages?

Show Answer
Correct Answer: C

The correct method to discover which instance Terraform manages is to run terraform state list to find the names of all VMs managed by Terraform. Then, for each VM name, run terraform state show to get detailed information, including the VM IDs. This process directly links the VM names managed by Terraform with their corresponding IDs, allowing you to identify the VM that is being managed by Terraform.

Discussion

3 comments
Sign in to comment
DevoteamAnalytixOption: C
Jun 26, 2023

https://developer.hashicorp.com/terraform/cli/commands/state/list https://developer.hashicorp.com/terraform/cli/commands/state/show

dankositzkeOption: C
Feb 24, 2024

I vote C

SureNotOption: B
Jun 12, 2024

Multiple answer? - BC. B will also work.