Is the new import block compatible with loops?

Hello team:

I’m using the new feature to import resources the import block

import {
to =
id =
}

My question is: is it possible to use this block with a loop structure like the for_each? is there any documentation for this?

Thank you!

I’ve not yet tried it with a for_each loop, but I have used variables.

We have multiple environments and have found the same resource NOT being under Terraform’s control.

So, we created a variable, add the value to each terraform.tfvars and used the variable in the import {} block.