VCD - loop -Reference to undeclared resource

Hello, i am beginner with terraform, i declared the sizing policy (var:compute) in my variable file ( list of object), when i use the loop for each to use the right sizing policy it does not work
sizing_policy_id = data.vcd_vm_sizing_policy.[each.value.compute].id
i tried also to declare the variable like compute = “data.vcd_vm_sizing_policy.VM_CRIT_4_8.id” and use it like sizing_policy_id = each.value.compute but also does not work.

Any suggestions are welcomed

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.