Skip to content

Commit

Permalink
split policies into two separate local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Mar 14, 2022
1 parent 5019ff8 commit 3601030
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "serverless-user" {
aws_region = var.aws_region
enable_api_gateway = true

extra_policies = [local.s3_policy]
extra_policies = [local.s3_policy, local.api_gateway_policy]
}

output "serverless-access-key-id" {
Expand All @@ -32,9 +32,15 @@ locals {
"s3:GetBucketPolicy",
],
"Resource" : [
"arn:aws:s3:::mfa-api-*-serverlessdeploymentbucket*"
"arn:aws:s3:::mfa-api-*-serverlessdeploymentbucket*",
]
},
]
})

api_gateway_policy = jsonencode({
"Version" : "2012-10-17",
"Statement" : [
{
"Effect" : "Allow",
"Action" : [
Expand Down

0 comments on commit 3601030

Please sign in to comment.