vendors have codes on them; making sqs for processing.
This commit is contained in:
@@ -45,6 +45,36 @@ resource "aws_s3_bucket" "invoices" {
|
||||
}
|
||||
EOF
|
||||
}
|
||||
resource "aws_sqs_queue" "integreat-mail" {
|
||||
name = "integreat-mail-prod"
|
||||
|
||||
policy = <<POLICY
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Principal": "*",
|
||||
"Action": "sqs:SendMessage",
|
||||
"Resource": "arn:aws:sqs:*:*:integreat-mail-prod",
|
||||
"Condition": {
|
||||
"ArnEquals": { "aws:SourceArn": "${aws_s3_bucket.invoices.arn}" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
POLICY
|
||||
}
|
||||
|
||||
resource "aws_s3_bucket_notification" "mail_bucket_notification" {
|
||||
bucket = "${aws_s3_bucket.invoices.id}"
|
||||
|
||||
queue {
|
||||
queue_arn = "${aws_sqs_queue.integreat-mail.arn}"
|
||||
events = ["s3:ObjectCreated:*"]
|
||||
filter_suffix = ""
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_iam_user" "app_user" {
|
||||
name = "integreat"
|
||||
|
||||
Reference in New Issue
Block a user