Hello, New to this forums, Some Question on Debugging Terraform Code

hello,

I would like to console.log a loop to test my code

test = [
     {
        name : "etc"
        label : "etc2"
     }
     {
         name : "etc3"
        label : "etc4"
     }

]

are there no way to

test.foreach(element => {
   console.log(element)
})

here?

because it’s pain in the ass to know how this shows the result when it’s only telling me validate exception

"${local.arn_body}:${local.sqs}:${var.region}:${data.aws_caller_identity.current.account_id}:${each.value.name}"