BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam VA-002-P Topic 4 Question 61 Discussion

Actual exam question for HashiCorp's VA-002-P exam
Question #: 61
Topic #: 4
[All VA-002-P Questions]

Which statements best describes what the local variable assignment is doing in the following code snippet:

1. variable "subnet_details" {

2. type = list(object({

3. cidr = string

4. subnet_name = string

5. route_table_name = string

6. aznum = number

7. }))

8. }

9. locals {

10. route_tables_all = distinct([for s in var.subnet_details : s.route_table_name ])

11. }

Show Suggested Answer Hide Answer
Suggested Answer: D

route_tables_all is assigned a list of unique route table names filtered from a list of objects describing subnet details, one of those object attributes being route_table_name.


Contribute your Thoughts:

Currently there are no comments in this discussion, be the first to comment!


Save Cancel