mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
sqs policy
This commit is contained in:
parent
e1ce16e3cd
commit
65daf388da
1 changed files with 15 additions and 0 deletions
|
|
@ -5,4 +5,19 @@ resource "aws_lambda_event_source_mapping" "this" {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "aws_iam_role_policy" "allow_sqs" {
|
||||||
|
role = var.lambda_role_name
|
||||||
|
|
||||||
|
policy = jsonencode({
|
||||||
|
Version = "2012-10-17"
|
||||||
|
Statement = [{
|
||||||
|
Effect = "Allow"
|
||||||
|
Action = [
|
||||||
|
"sqs:ReceiveMessage",
|
||||||
|
"sqs:DeleteMessage",
|
||||||
|
"sqs:GetQueueAttributes"
|
||||||
|
]
|
||||||
|
Resource = var.queue_arn
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue