Im trying to setup two queues using terraform with the resource ‘aws_sqs_queue’ one is the main queue and the other one is the dead letter queue, i see very clear that from the main queue to configure a dead letter queue i just need to use something like
Where i define what is the arn of the dead letter queue and the max recieve count, that ok but im not clear about how should i configure the dead letter queue to only allow messages from this main queue.
In AWS console in the queue edit/add form there are a section called " Redrive allow policy - Optional" where you can configure what queues can use this as dead letter queue