TA-002-P · Question #199
You have been given requirements to create a security group for a new application. Since your organization standardizes on Terraform, you want to add this new security group with the fewest number…
The correct answer is D. dynamic block. 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.
Question
You have been given requirements to create a security group for a new application. Since your organization standardizes on Terraform, you want to add this new security group with the fewest number of lines of code. What feature could you use to iterate over a list of required tcp ports to add to the new security group?
Options
- Adynamic backend
- Bsplat expression
- Cterraform import
- Ddynamic block
How the community answered
(47 responses)- A11% (5)
- B6% (3)
- C4% (2)
- D79% (37)
Explanation
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.
Topics
Community Discussion
No community discussion yet for this question.