Closed muranant closed 3 years ago
Hi @muranant !
There is no need to use count
inside of the module because you can call this module multiple time to get several resources created, like described here:
module "key_pair" {
for_each = toset(["key1", "key2"])
source = "terraform-aws-modules/key-pair/aws"
key_name = each.key
}
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
We recently found a need to create a keypair with every VM that we create. So there were two updates to the module. One was to support count in this module and use this array of keys in the VM module.
I can create a PR for the same, if you feel there is a need to entertain it.