Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 10

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?

    Correct Answer: C

    Given that no outputs were created in your Terraform code, running 'terraform output ip_address' will not yield any information. The best method to quickly find the IP address of the deployed resource is to run 'terraform state list' to find the name of the resource and then use 'terraform state show' followed by the resource name to display its attributes, which include the public IP address.

Discussion
coco10kOption: C

You can find the info in the state. not A because you don't have to outputs defined.

samimshaikhOption: C

C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes, including the public IP address. Explanation: Not Option A (terraform output ip_address) assumes that there is an output variable named ip_address in your Terraform configuration, but since you mentioned that you did not create any outputs, this option may not be applicable.

otakuinsideOption: C

A cannot be. You don't have any output declared, so there is no default output or something like that where you could find the ip address. On the other hand, terraform state list, and then show specific, contains the state and this includes the ip address

cdecheryOption: C

If there is no output defined for the resource, the "output" command will not show anything. Correct is C.

connecttozeeOption: C

100% is C

campsOption: C

C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address is the best method to quickly find the IP address of the resource you deployed. terraform state list will show you the name of all the resources currently tracked in your Terraform state. You can then use terraform state show followed by the resource name to see all the details of the resource, including any attributes like the public IP address.

hrajkumaOption: C

vote for option C

brundabanmOption: C

C is the correct answer.

Prat8

Is it C or A ?

luke404Option: C

The question does not talk about any output defined so you can't expect one

gofavad926Option: C

C for sure

grogudevOption: C

C I choose too

JayanthOption: C

C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address

Busi57Option: C

C i choose

Shane_COption: C

C is the correct the answer. It can't be A as the output isn't defined

SIAMIANJIOption: C

C is correct,

Ni33Option: C

C is the correct answer