TFNFR7 - Count & for_each Use
We can use count
and for_each
to deploy multiple resources, but the improper use of count
can lead to
anti pattern
.
You can use count
to create some kind of resources under certain conditions, for example:
We can use count
and for_each
to deploy multiple resources, but the improper use of count
can lead to
anti pattern
.
You can use count
to create some kind of resources under certain conditions, for example:
There are 3 types of assignment statements in a resource
or data
block: argument, meta-argument and nested block. The argument assignment statement is a parameter followed by =
:
The meta-arguments below SHOULD be declared on the top of a module
block with the following order:
source
version
count
for_each
blank lines will be used to separate them.