Skip to content

Commit

Permalink
Merge pull request #17 from BCDevOps/update-boundary
Browse files Browse the repository at this point in the history
Add sqs and secrets manager to boundary policy
  • Loading branch information
prabhukiran9999 authored Oct 18, 2024
2 parents 8803230 + ef3c6d9 commit 19e24a3
Showing 1 changed file with 64 additions and 37 deletions.
101 changes: 64 additions & 37 deletions modules/iam-users/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -187,41 +187,68 @@ resource "aws_iam_policy" "s3_full_access_boundary" {
path = "/"
description = "Permission boundary policy for the BC Gov IAM user service"

policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Sid = "S3FullAccess",
Effect = "Allow",
Action = "s3:*",
Resource = "*"
},
{
Sid = "SESFullAccess",
Effect = "Allow",
Action = "ses:*",
Resource = "*"
},
{
Sid = "BedrockFullAccess",
Effect = "Allow",
Action = "bedrock:*",
Resource = "*"
},
{
Sid = "SSMandKMSAccess",
Effect = "Allow",
Action = [
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:GetParametersByPath",
"kms:Decrypt"
],
Resource = [
"arn:aws:ssm:*:*:parameter/iam_users/*",
"arn:aws:kms:*:*:key/*"
]
}
]
})
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "S3FullAccess",
"Effect": "Allow",
"Action": "s3:*",
"Resource": "*"
},
{
"Sid": "SESFullAccess",
"Effect": "Allow",
"Action": "ses:*",
"Resource": "*"
},
{
"Sid": "BedrockFullAccess",
"Effect": "Allow",
"Action": "bedrock:*",
"Resource": "*"
},
{
"Sid": "SQSFullAccess",
"Effect": "Allow",
"Action": "sqs:*",
"Resource": "*"
},
{
"Sid": "AllowSecretsManagerFullAccessToExternalSecrets",
"Effect": "Allow",
"Action": [
"secretsmanager:*"
],
"Resource": "arn:aws:secretsmanager:*:*:secret:external/*"
},
{
"Sid": "AllowSSMFullAccessToExternalParameters",
"Effect": "Allow",
"Action": "ssm:*",
"Resource": "arn:aws:ssm:*:*:parameter/external/*"
},
{
"Sid": "SSMAccess",
"Effect": "Allow",
"Action": [
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:GetParametersByPath"
],
"Resource": "arn:aws:ssm:*:*:parameter/iam_users/*"
},
{
"Sid": "KMSAccess",
"Effect": "Allow",
"Action": [
"kms:Decrypt",
"kms:Encrypt"
],
"Resource": "arn:aws:kms:*:*:key/*"
}
]
}
EOF
}

0 comments on commit 19e24a3

Please sign in to comment.