mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
policy exists
This commit is contained in:
parent
00fe4fea2b
commit
7b02e53f1d
1 changed files with 35 additions and 31 deletions
|
|
@ -16,38 +16,42 @@ resource "aws_sqs_queue" "walthamforest_etl_queue" {
|
|||
}
|
||||
|
||||
|
||||
# IAM policy specific to this Lambda
|
||||
resource "aws_iam_policy" "walthamforest_etl_policy" {
|
||||
name = "walthamforest_etl-loader-policy"
|
||||
# # IAM policy specific to this Lambda
|
||||
# resource "aws_iam_policy" "walthamforest_etl_policy" {
|
||||
# name = "walthamforest_etl-loader-policy"
|
||||
|
||||
policy = jsonencode({
|
||||
Version = "2012-10-17",
|
||||
Statement = [
|
||||
{
|
||||
Effect = "Allow",
|
||||
Action = [
|
||||
"sqs:ReceiveMessage",
|
||||
"sqs:DeleteMessage",
|
||||
"sqs:GetQueueAttributes"
|
||||
],
|
||||
Resource = aws_sqs_queue.walthamforest_etl_queue.arn
|
||||
},
|
||||
{
|
||||
Effect = "Allow",
|
||||
Action = [
|
||||
"ecr:GetDownloadUrlForLayer",
|
||||
"ecr:BatchGetImage",
|
||||
"ecr:BatchCheckLayerAvailability"
|
||||
],
|
||||
Resource = data.aws_ecr_repository.walthamforest_etl_ecr.arn
|
||||
},
|
||||
{
|
||||
Effect = "Allow",
|
||||
Action = ["ecr:GetAuthorizationToken"],
|
||||
Resource = "*"
|
||||
}
|
||||
]
|
||||
})
|
||||
# policy = jsonencode({
|
||||
# Version = "2012-10-17",
|
||||
# Statement = [
|
||||
# {
|
||||
# Effect = "Allow",
|
||||
# Action = [
|
||||
# "sqs:ReceiveMessage",
|
||||
# "sqs:DeleteMessage",
|
||||
# "sqs:GetQueueAttributes"
|
||||
# ],
|
||||
# Resource = aws_sqs_queue.walthamforest_etl_queue.arn
|
||||
# },
|
||||
# {
|
||||
# Effect = "Allow",
|
||||
# Action = [
|
||||
# "ecr:GetDownloadUrlForLayer",
|
||||
# "ecr:BatchGetImage",
|
||||
# "ecr:BatchCheckLayerAvailability"
|
||||
# ],
|
||||
# Resource = data.aws_ecr_repository.walthamforest_etl_ecr.arn
|
||||
# },
|
||||
# {
|
||||
# Effect = "Allow",
|
||||
# Action = ["ecr:GetAuthorizationToken"],
|
||||
# Resource = "*"
|
||||
# }
|
||||
# ]
|
||||
# })
|
||||
# }
|
||||
|
||||
data "aws_iam_policy" "walthamforest_etl" {
|
||||
name = "walthamforest_etl-loader-policy"
|
||||
}
|
||||
|
||||
resource "aws_iam_role_policy_attachment" "walthamforest_etl_policy_attach" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue