HashiCorp Certified: Terraform Associate — Question 182
Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?
Answer options
- A. terraform state list ‘provider_type.name’
- B. terraform state show ‘provider_type.name’
- C. terraform get ‘provider_type.name’
- D. terraform state list
Correct answer: B
Explanation
The correct answer is B, as 'terraform state show' provides comprehensive details and attributes of the specified resource. Option A simply lists the resources rather than showing their details, option C is incorrect because 'terraform get' is not used for this purpose, and option D also only lists resources without showing their attributes.