HashiCorpHashiCorp
TA-002-P · Question #38
TA-002-P Question #38: Real Exam Question with Answer & Explanation
Sign in or unlock TA-002-P to reveal the answer and full explanation for question #38. The question stem and answer options stay visible for context.
Read, generate, and modify configuration
Question
You have declared a variable called var.list which is a list of objects that all have an attribute id. Which options will produce a list of the IDs? (Choose two.)
Options
- A{ for o in var.list : o => o.id }
- Bvar.list[*].id
- C[ var.list[*].id ]
- D[ for o in var.list : o.id ]
Unlock TA-002-P to see the answer
You've previewed enough free TA-002-P questions. Unlock TA-002-P for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#HCL Syntax#List Manipulation#For Expressions#Splat Operator