HashiCorp Certified: Terraform Associate — Question 1

You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code.
What is the best method to quickly find the IP address of the resource you deployed?

Answer options

Correct answer: C

Explanation

The correct answer is C because running 'terraform state list' allows you to identify the deployed resource, and 'terraform state show' provides detailed attributes including the public IP address. Option A is incorrect since it requires outputs, which were not created. Option B is not the quickest method as it involves additional steps to access the state file. Option D is not advisable as it destroys the existing infrastructure, which is unnecessary just to retrieve the IP address.