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

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

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 2 years, 2 months ago
Has to be Answer A. no such definition as "return"
upvoted 22 times
...
Bere
Most Recent 10 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 3 times
...
MauroSoli
1 year, 1 month ago
Answer is A but syntax is deprecated
upvoted 4 times
...
syam22587
1 year, 3 months ago
A is correct answer
upvoted 1 times
...
junk4share
1 year, 4 months ago
A is correct.
upvoted 1 times
...
phidelics
1 year, 8 months ago
The answer is A
upvoted 1 times
...
kennynelcon
1 year, 9 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 ...