Which options will produce a list of the IDs?
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.)
A . { for o in var.list: o => o.id }
B. var.list[*].id
C. [ var.list[*].id ]
D. [ for o in var.list: o.id ]
Answer: B,D
Explanation:
https://www.terraform.io/language/expressions/splat
A splat expression provides a more concise way to express a common operation that could otherwise be performed with a for expression.
Latest TA-002-P Dumps Valid Version with 324 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments