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 130 discussion

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

You are writing a child Terraform module which provisions an AWS instance. You want to make use of the IP address returned in the root configuration. You name the instance resource "main".
Which of these is the correct way to define the output value using HCL2?
A.

B.

Show Suggested Answer Hide Answer
Suggested Answer: A

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
keiffo2
Highly Voted 1 year, 7 months ago
Has to be Answer A. no such definition as "return"
upvoted 21 times
...
Bere
Most Recent 3 months, 1 week ago
Answer is A In Terraform versions 0.11 and earlier, you would use the interpolation syntax with ${} to reference attributes: # Terraform 0.11 and earlier output "instance_ip_addr" { value = "${aws_instance.main.private_ip}" } Starting with Terraform 0.12, interpolation is not needed for simple references, so you can directly reference the attribute: # Terraform 0.12 and later output "instance_ip_addr" { value = aws_instance.main.private_ip }
upvoted 2 times
...
MauroSoli
6 months ago
Answer is A but syntax is deprecated
upvoted 3 times
...
syam22587
8 months ago
A is correct answer
upvoted 1 times
...
junk4share
9 months, 2 weeks ago
A is correct.
upvoted 1 times
...
phidelics
1 year, 1 month ago
The answer is A
upvoted 1 times
...
kennynelcon
1 year, 2 months ago
A is accurate
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 ...