Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Terraform Associate topic 1 question 10 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 10
Topic #: 1
[All Terraform Associate Questions]

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
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
Reference:
https://www.terraform.io/docs/cli/commands/output.html

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
coco10k
Highly Voted 2 years ago
Selected Answer: C
You can find the info in the state. not A because you don't have to outputs defined.
upvoted 27 times
...
samimshaikh
Most Recent 3 months, 4 weeks ago
Selected Answer: 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.
upvoted 1 times
...
Prat8
5 months ago
Is it C or A ?
upvoted 1 times
...
luke404
5 months, 3 weeks ago
Selected Answer: C
The question does not talk about any output defined so you can't expect one
upvoted 1 times
...
gofavad926
6 months, 4 weeks ago
Selected Answer: C
C for sure
upvoted 1 times
...
otakuinside
7 months ago
Selected Answer: 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
upvoted 2 times
...
grogudev
7 months ago
Selected Answer: C
C I choose too
upvoted 1 times
...
Jayanth
9 months ago
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
upvoted 1 times
...
Busi57
9 months ago
Selected Answer: C
C i choose
upvoted 1 times
...
cdechery
9 months, 1 week ago
Selected Answer: C
If there is no output defined for the resource, the "output" command will not show anything. Correct is C.
upvoted 2 times
...
Shane_C
9 months, 3 weeks ago
Selected Answer: C
C is the correct the answer. It can't be A as the output isn't defined
upvoted 1 times
...
SIAMIANJI
10 months, 4 weeks ago
Selected Answer: C
C is correct,
upvoted 1 times
...
Ni33
11 months, 3 weeks ago
Selected Answer: C
C is the correct answer
upvoted 1 times
...
connecttozee
1 year ago
100% is C
upvoted 2 times
...
camps
1 year ago
Selected Answer: 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.
upvoted 2 times
...
Power123
1 year ago
C is correct
upvoted 1 times
...
alexsandroe
1 year, 1 month ago
Selected Answer: C
correct
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...