Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 90

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

    Correct Answer: D

    D

    Reference:

    https://www.hashicorp.com/blog/hashicorp-terraform-0-12-preview-for-and-for-each

Discussion
bp339Option: D

Dynamic is true...

eduvar4Option: D

https://developer.hashicorp.com/terraform/language/expressions/dynamic-blocks

alen995454

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

EltoothOption: D

D is correct answer : dynamic https://www.terraform.io/language/expressions/dynamic-blocks

Abhijeet2904Option: 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.

Nunyabiznes

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.

biprodattaOption: A

dynamic doesn't create nested block, for_each does

Ni33Option: A

A is the correct answer.

Power123Option: D

Dynamic block. D