Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 44


What is one disadvantage of using dynamic blocks in Terraform?

Show Answer
Correct Answer: C

One disadvantage of using dynamic blocks in Terraform is that they make configuration harder to read and understand. While they are powerful and allow for the creation of repeatable and complex structures, their overuse can lead to configurations that are less straightforward and more difficult to maintain. It is generally recommended to write nested blocks literally when possible to maintain clarity and ease of understanding.

Discussion

22 comments
Sign in to comment
ItaloVinodiOption: C
May 13, 2022

Looking at documentation "Overuse of dynamic blocks can make configuration hard to read and maintain"

BereOption: C
Jul 30, 2023

Answer is C They make configuration harder to read and understand. While dynamic blocks in Terraform are powerful tools that can create multiple blocks based on complex input structures, their usage can also lead to configurations that are harder to read and understand. This is because the logic for creating the dynamic blocks is usually more complex and less straightforward than static block configurations.

ShinLiOption: C
May 1, 2022

it should be C, A is a bug, from the URL provided below, it was fixed. "I re-tested this with v0.12.0-alpha4 and it seems to now be fixed. I did make a few adjustments to the configuration example, though:"

bigboi23Option: C
May 18, 2022

Dynamic blocks are used for looping, C is the right answer.

trongod05
Jul 1, 2022

C "Overuse of dynamic blocks can make configuration hard to read and maintain, so we recommend using them only when you need to hide details in order to build a clean user interface for a re-usable module. Always write nested blocks out literally where possible."

srajvanshi
Jul 19, 2023

https://developer.hashicorp.com/terraform/language/expressions/dynamic-blocks Overuse of dynamic blocks can make configuration hard to read and maintain, so we recommend using them only when you need to hide details in order to build a clean user interface for a re-usable module. Always write nested blocks out literally where possible.

Oyster
May 14, 2022

Answer should be C, They make your codes difficult to read

InformationOverloadOption: C
Jan 2, 2023

C is correct! Dynamic blocks allow you to define infrastructure resources using variables, which can make it harder to see exactly what resources are being created. This can make it more difficult to troubleshoot issues and understand the overall architecture of your infrastructure.

legendary7
Sep 27, 2022

C- is the correct answer Ref: https://www.terraform.io/language/expressions/dynamic-blocks#best-practices-for-dynamic-blocks

syam22587Option: C
Aug 21, 2023

C is correct

EltoothOption: C
Jun 27, 2022

C is correct answer.

Ahmad_Terraform
Jul 13, 2022

They make configuration harder to read and understand

yuvifoseOption: C
Jul 18, 2022

C is the correct answer. It's not recommended to abuse them because it hurts readability

dnscloud02Option: C
Sep 24, 2022

C is correct answer.

Atta33
Nov 28, 2022

They make configuration hard to read and understand.

zaz_
Jan 7, 2023

C is the correct Option.

sahara99Option: C
Feb 15, 2023

reading dynamic blocks doc. --> C is the correct answer

alexsandroeOption: C
Feb 25, 2023

correct answer

Power123
Mar 30, 2023

Answer is C

Mehkay
Aug 20, 2023

Correct answer C

cafl7787
Feb 23, 2024

For sure C.

anand0310Option: C
Aug 31, 2024

C is correct answer