All,
I have a resource that loops thru a map and creates multiple resources.
resource "aws_instance" "this" {
for_each = var.instance_map
...
}
I now want to reference all the arns for backup. Something like the following. Is there a way to reference all the arns without having to loop back through all the instances using 'each.key'?
#Backup Selection (Instance) Resource
resource "aws_backup_selection" "selection" {
...
resources = [
aws_instance.ths[each.key].arn,
]
}