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

Actual exam question from HashiCorp's Terraform Associate
Question #: 221
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.
  • C.
  • D.
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
090200f
3 months, 3 weeks ago
Selected Answer: A
omg almost all answers showing wrong option in examtopics, here easily we can say that option A is correct.
upvoted 1 times
...
wirkmood
6 months, 2 weeks ago
Selected Answer: A
It's A.
upvoted 1 times
...
oskarq
1 year, 7 months ago
Selected Answer: A
A is the new one but both would work: output "name-rg" { value = azurerm_resource_group.example.name } output "name-rg2" { value = "${azurerm_resource_group.example.name}" } Changes to Outputs: + name-rg = "example-resource-group" + name-rg2 = "example-resource-group"
upvoted 3 times
...
FarziWaliMarzi
1 year, 7 months ago
Selected Answer: A
A for sure
upvoted 1 times
...
KakashiCopyNinja
1 year, 7 months ago
Selected Answer: A
It is A. See this documentation: https://developer.hashicorp.com/terraform/language/values/outputs
upvoted 1 times
...
camps
1 year, 7 months ago
Selected Answer: A
It's A
upvoted 1 times
...
tbhtp
1 year, 7 months ago
its should be A. A output could look like this: output "example_output" { value = aws_instance.example.public_ip description = "The public IP address of the example instance." }
upvoted 1 times
...
sandyrao
1 year, 7 months ago
Selected Answer: A
answer should be A https://developer.hashicorp.com/terraform/language/values/outputs#declaring-an-output-value
upvoted 2 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 ...