forked from opsworks-co/vector-eks-s3-opensearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsqs.tf
37 lines (32 loc) · 732 Bytes
/
sqs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
locals {
sqs_name = lower("${var.name}-${var.eks_cluster_name}")
}
module "vector_sqs" {
source = "terraform-aws-modules/sqs/aws"
version = "4.1.0"
name = local.sqs_name
visibility_timeout_seconds = 10
create_queue_policy = true
queue_policy_statements = {
account = {
sid = "AccounWrite"
actions = [
"sqs:SendMessage",
]
principals = [
{
type = "Service"
identifiers = ["s3.amazonaws.com"]
}
]
conditions = [
{
test = "ArnEquals"
variable = "aws:SourceArn"
values = [module.vector_s3_bucket.s3_bucket_arn]
}
]
}
}
tags = var.tags
}