Sets up toast

This commit is contained in:
2023-12-03 20:20:26 -08:00
parent eb6441b36d
commit df4410ac9d
4 changed files with 193 additions and 154 deletions

View File

@@ -108,6 +108,33 @@ POLICY
}
}
resource "aws_s3_bucket" "toast_bucket" {
bucket = "toast.${var.stage}.app.integreatconsult.com"
}
resource "aws_s3_bucket_policy" "toast_policy" {
bucket = aws_s3_bucket.toast_bucket.id
policy = data.aws_iam_policy_document.toast_policy_doc.json
}
data "aws_iam_policy_document" "toast_policy_doc" {
statement {
principals {
type = "AWS"
identifiers = ["${var.task_role_arn}", "arn:aws:iam::679918342773:role/http-proxy"]
}
actions = [
"s3:*",
]
resources = [
aws_s3_bucket.toast_bucket.arn,
"${aws_s3_bucket.toast_bucket.arn}/*",
]
}
}
resource "aws_sqs_queue" "integreat-mail" {
name = "integreat-mail-${var.stage}"