apm-wo-analysis/terraform/sqs.tf

32 lines
738 B
Terraform
Raw Normal View History

resource "aws_sqs_queue" "classifier_dlq" {
name = "apm-wo-analysis-classifier-dlq"
message_retention_seconds = 1209600
sqs_managed_sse_enabled = true
}
data "aws_iam_policy_document" "classifier_dlq" {
statement {
sid = "DenyInsecureTransport"
effect = "Deny"
principals {
type = "*"
identifiers = ["*"]
}
actions = ["sqs:*"]
resources = [aws_sqs_queue.classifier_dlq.arn]
condition {
test = "Bool"
variable = "aws:SecureTransport"
values = ["false"]
}
}
}
resource "aws_sqs_queue_policy" "classifier_dlq" {
queue_url = aws_sqs_queue.classifier_dlq.id
policy = data.aws_iam_policy_document.classifier_dlq.json
}