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

Actual exam question from HashiCorp's Terraform Associate
Question #: 90
Topic #: 1
[All Terraform Associate Questions]

What type of block is used to construct a collection of nested configuration blocks?

  • A. for_each
  • B. repeated
  • C. nesting
  • D. dynamic
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
bp339
Highly Voted 2 years, 5 months ago
Selected Answer: D
Dynamic is true...
upvoted 8 times
...
biprodatta
Most Recent 1 year, 4 months ago
Selected Answer: A
dynamic doesn't create nested block, for_each does
upvoted 1 times
...
Ni33
1 year, 6 months ago
Selected Answer: A
A is the correct answer.
upvoted 1 times
...
Power123
1 year, 7 months ago
Dynamic block. D
upvoted 1 times
...
Abhijeet2904
1 year, 9 months ago
Selected Answer: A
A. for_each In Terraform, you can use the "for_each" block to construct a collection of nested configuration blocks that are repeated based on an input list or map data structure. The "for_each" block allows you to define reusable code that can be applied to multiple resources, similar to a loop in a programming language. The block takes a data structure as an argument and creates one block of nested configuration for each element in the data structure, allowing you to manage multiple similar resources in a more streamlined way.
upvoted 2 times
Nunyabiznes
1 year, 8 months ago
The dynamic block in Terraform is used to construct nested configuration blocks dynamically based on a collection of values, such as a list or a map. This block type allows you to create multiple instances of the same resource or module, without having to duplicate the configuration code. The for_each argument is used with the dynamic block to specify the collection of values to iterate over. The content block inside the dynamic block is used to define the configuration for each iteration.
upvoted 11 times
...
...
eduvar4
2 years, 1 month ago
Selected Answer: D
https://developer.hashicorp.com/terraform/language/expressions/dynamic-blocks
upvoted 4 times
alen995454
10 months, 2 weeks ago
form page shared above: "A dynamic block acts much like a for expression, but produces nested blocks instead of a complex typed value. It iterates over a given complex value, and generates a nested block for each element of that complex value." "The for_each argument provides the complex value to iterate over." To me this says "D" is correct
upvoted 1 times
...
...
Eltooth
2 years, 4 months ago
Selected Answer: D
D is correct answer : dynamic https://www.terraform.io/language/expressions/dynamic-blocks
upvoted 4 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 ...