hiexam
hashicorp · Terraform-Associate · Q425 · multiple_choice · topic_1

You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs fo…

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?
  • A.Run terraform output ip_address to view the result
  • B.In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file
  • C.Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
  • D.Run terraform destroy then terraform apply and look for the IP address in stdout
Explanation
Selected Answer: C You can find the info in the state. not A because you don't have to outputs defined.

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.