Question 590
At Silverlake Manufacturing IT, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a load balancer requires zero or more repeated listener rules but the HCL duplicates one block manually for each rule. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. What mechanism explains why the original approach fails?
Explanation
Correct Answer
Dynamic blocks generate nested provider configuration blocks from collections. That mechanism distinguishes dynamic nested block generation in the Silverlake Manufacturing IT case. The corresponding appropriate correction is: Use a dynamic block over validated rule inputs where the provider supports repeatable nested blocks. The measurable acceptance test is: Each approved rule becomes one correctly typed nested block.
Incorrect Answers
The offered principle describes: For expressions transform collections into new values without external preprocessing. The situation in this question instead depends on: Dynamic blocks generate nested provider configuration blocks from collections. These are different technical conditions.
This alternative is valid when vault can issue time-bounded credentials instead of long-lived shared static secrets. The facts here establish a different controlling reason: Dynamic blocks generate nested provider configuration blocks from collections.
“Installing a provider does not itself authenticate Terraform to the external service” reflects the mechanism: Installing a provider does not itself authenticate Terraform to the external service. The actual reported symptoms are better explained by: Dynamic blocks generate nested provider configuration blocks from collections.